Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Challenge!!!!!!!!!!!!!!Any one!

Featured Replies

I have 2 databases. DATABASE1 and DATABASE2. And in both the database files i have a field called FIRSTNAME.

So what i want to do is i want to search a first name from 2 databases.

Like in my search page if i enter somename and click search button then it should search from 2 databses.Can this be done.If so plese send me the code.(check is it possible to display results in 2 pages for each databases) .

Very Urgent!

thanx

sree

I came to know that we can search 2 databases at one click by using INLINE tag. Can anybody give me the code,how to search 2 databases from a single search page. Suppose to search FIRSTNAME from 2 databases.

Please write me code for this.

Thanx

sree

  • Author

Comeon yaar. Post your replies. Possibe or not .

Not even a single reply. Impossible yaar.Someone must be knowing.Help me pleaseeeeeeeeeeeeee

Here is a basic method which is working. I have two database named names1.fp5 and names2.fp5 they both have a field called 'fname' and a field called 'sname'.

This is the input form:

<body>

<form action="http://10.0.1.2:1154/FMPro" method="post">

<input type="hidden" name="-db" value="names1.fp5">

<input type="hidden" name="-format" value="name_list.html">

<input type="hidden" name="-lay" value="allfields">

<input type="text" name="fname">

<input type="submit" name="-find" value="Search">

</form>

</body>

Here is the format file which lists the results:

<body>

[FMP-Record]

[FMP-Field:fname] [FMP-Field:sname]<br>

[/FMP-Record]

[FMP-InlineAction: -db="names2.fp5", -lay="allfields", fname="{FindValueItem}", -find]

[FMP-Record]

[FMP-Field:fname] [FMP-Field:sname]<br>

[/FMP-Record]

[/FMP-InlineAction]

</body>

Hope this helps.

Garry

Here is an enhanced version. The last version would have a problem if the fname being searched for was not in names1.fp5, i.e. a 'No Records Found' alert would be displayed and the name_list.html format file would not open and hence the names2.fp5 file would not be searched. So the new search form uses -view and -token tags with both searches using InlineAction tags.

<form action="http://10.0.1.2:1154/FMPro" method="post">

<input type="hidden" name="-db" value="names1.fp5">

<input type="hidden" name="-format" value="name_list.html">

<input type="text" name="-token">

<input type="submit" name="-view" value="Search">

</form>

name_list.html:

<body>

[FMP-InlineAction: -db="names1.fp5", -lay="allfields", fname="{CurrentToken}", -find]

[FMP-Record]

[FMP-Field:fname] [FMP-Field:sname]<br>

[/FMP-Record]

[/FMP-InlineAction]

[FMP-InlineAction: -db="names2.fp5", -lay="allfields", fname="{CurrentToken}", -find]

[FMP-Record]

[FMP-Field:fname] [FMP-Field:sname]<br>

[/FMP-Record]

[/FMP-InlineAction]

</body>

What do I win? ;-)

Garry

  • Author

Thanx Garry it worked. U r a good programmer. Actually i tried for this. But i wrote all inline tags in search page itself.So it didn't worked for me. Any how thanx alot garry. Can u help me in this. I hope u can. I want to display the results in 2 different pages.I mean display results of the DB1 in one page and DB2 in 2nd page.

Can u write me the code.

thanx

sree

Ok, you need to change the format file to include a form as shown:

<body>

[FMP-InlineAction: -db="names1.fp5", -lay="allfields", fname="{CurrentToken}", -find]

[FMP-Record]

[FMP-Field:fname] [FMP-Field:sname]<br>

[/FMP-Record]

[/FMP-InlineAction]

<form action="http://10.0.1.2:1154/FMPro" method="post">

<input type="hidden" name="-db" value="names2.fp5">

<input type="hidden" name="-format" value="name_list2.html">

<input type="hidden" name="-token" value="[FMP-CurrentToken]">

<input type="submit" name="-view" value="List 2">

</form>

</body>

Then create a second format file; to show the names from the second db.

<body>

[FMP-InlineAction: -db="names2.fp5", -lay="allfields", fname="{CurrentToken}", -find]

[FMP-Record]

[FMP-Field:fname] [FMP-Field:sname]<br>

[/FMP-Record]

[/FMP-InlineAction]

</body>

This will do the job. However, you do not have to use Inline tags for the second format file, you can use the standard [FMP-Record] tags etc.

Garry

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.