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.

Featured Replies

i am currently building an application for Water Billing System.

I have 2 tables:

wb-which is the Customers Information.

Transactions-for the Water Meter Readings Record.

i am working on my reports layouts for filtering using 2 global fields. that i set before opening my report layouts.

Global Fields-g_Address & g_Month.

this my script that i am using.

Set Variable[$Address; Value:g_Address]

Set Variable[$Month;Value:g_Month]

Enter Find Mode[]

Set Field [wb::Address;$Address]

New Record/Request

Set Field [Transactions::Month;$Month]

Perform Find[]

i have set this on Script Triggers-OnRecordLoad

but when trying my cursor just loading but it did not show what i want to filter.

Please help!

 

 

You don't need to set variables first, just use the global fields in the find request.  Not that it would change anything but it's just not needed.

Also note that when searching on text fields and you want an exact match you need to prepend the find request wtih "==" Otherwise if your global field says "123 Derry" the search as you have it will find all addresses that *start with* that string, so it will find "123 Derry" and "123 Derry Road" and "123 Derrymaid" and so on.

Your search request does an OR find: give me all record with this address OR this month.  If you want all address for the given month then don't use "new request" and use both fields in the same request.

 

  • Author

Thank you for that positive response sir,

when i tried it to run manually from the scripts, it runs just as i want and the results that i wanted.

but when i load it in Script Triggers (On Record Load)

it loads and the cursor keeps loading.

how do i stop the find when it is finished finding the data?

It's kind of a weird script to run on record load. What's happening is that each time you go from Find mode to Browse mode, the script triggers itself again, so you're stuck in an endless loop.

One way to work around this would be to put something like this at the top of the script:

If[ $$Halt ]
  Set Variable[ $$Halt ; 0 ]
  Halt Script
Else
  Set Variable[ $$Halt ; 1 ]
End If

 

  • Author

could i use the actual scirpt above before my enter find mode script?or do i need to use my global fields for setting the variable? i barely need this script for my reports.

Not sure what you mean; are you talking about capturing what the user wants to search on?  Then yes: you can use that.  And as I mentioned in my earlier response, you don't need to set the globals to variables, just use the globals.

Further to @Fitch's response: don't use a trigger to run this script, just give the user a button after the enter the globals and let the button run the script.

  • Author

thanks @Fitch and @Wim Decorte for the help! it works!

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.