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.

Find/Script/Button Questions

Featured Replies

  • Author

I tried looking for this in the Forums, but did not find anything that directly addressed my issue. I am trying to make a script that will be assigned to a button. I would like the button to (upon clicking it the first time) enter Find Mode, and then Pause so that the user may enter search criteria. This I have had no difficulty with. However, upon clicking the button for the second time, I would like the script to Resume, taking the criteria and actually performing a find. Is this possible? confused.gif If not, can anybody suggest an effective way of doing what I am trying to do? Thank you.

I tried looking for this in the Forums, but did not find anything that directly addressed my issue. I am trying to make a script that will be assigned to a button. I would like the button to (upon clicking it the first time) enter Find Mode, and then Pause so that the user may enter search criteria. This I have had no difficulty with. However, upon clicking the button for the second time, I would like the script to Resume, taking the criteria and actually performing a find. Is this possible? confused.gif If not, can anybody suggest an effective way of doing what I am trying to do? Thank you.

  • Author

I tried looking for this in the Forums, but did not find anything that directly addressed my issue. I am trying to make a script that will be assigned to a button. I would like the button to (upon clicking it the first time) enter Find Mode, and then Pause so that the user may enter search criteria. This I have had no difficulty with. However, upon clicking the button for the second time, I would like the script to Resume, taking the criteria and actually performing a find. Is this possible? confused.gif If not, can anybody suggest an effective way of doing what I am trying to do? Thank you.

In the script, you want to have an if statement determine whether the window is in find or browse with get(windowmode), and act accordingly.

In the script, you want to have an if statement determine whether the window is in find or browse with get(windowmode), and act accordingly.

In the script, you want to have an if statement determine whether the window is in find or browse with get(windowmode), and act accordingly.

I have found making dedicated Find layouts to be a real benefit: make then look different from the normal data entry screen so the users can tell the difference, and maybe consider putting pop-up lists on field to make data entry selection easier.

The "Find" button on the data entry layout will run the find script below: the "Find" button on the find layout simple has to Resume the script. Another advantage is that users can perform the find by just pressing the Enter key.

Allow User Abort [ off ]

Go to Layout [ "find layout" ]

Enter Find Mode [ pause ] # do not restore find requests #

Perform Find [] # do not restore find requests #

Go to Layout [ original layout ]

I have found making dedicated Find layouts to be a real benefit: make then look different from the normal data entry screen so the users can tell the difference, and maybe consider putting pop-up lists on field to make data entry selection easier.

The "Find" button on the data entry layout will run the find script below: the "Find" button on the find layout simple has to Resume the script. Another advantage is that users can perform the find by just pressing the Enter key.

Allow User Abort [ off ]

Go to Layout [ "find layout" ]

Enter Find Mode [ pause ] # do not restore find requests #

Perform Find [] # do not restore find requests #

Go to Layout [ original layout ]

I have found making dedicated Find layouts to be a real benefit: make then look different from the normal data entry screen so the users can tell the difference, and maybe consider putting pop-up lists on field to make data entry selection easier.

The "Find" button on the data entry layout will run the find script below: the "Find" button on the find layout simple has to Resume the script. Another advantage is that users can perform the find by just pressing the Enter key.

Allow User Abort [ off ]

Go to Layout [ "find layout" ]

Enter Find Mode [ pause ] # do not restore find requests #

Perform Find [] # do not restore find requests #

Go to Layout [ original layout ]

  • Author

I had tried making a separate layout for finding, but ran into a problem whenever a search would yield no results. If you click Continue, there was no problem, but many of the users thought that the Cancel button would take them back to the orginal layout. Much to everybody's dismay, it kept them in the find layout, but in Browse Mode, and they would try clicking on the Find button to get back into Find Mode, but of course, it did not take them there, it just repeated their previous find.

How would I get around this? Also what does "# do not restore find requests #" mean?

  • Author

I had tried making a separate layout for finding, but ran into a problem whenever a search would yield no results. If you click Continue, there was no problem, but many of the users thought that the Cancel button would take them back to the orginal layout. Much to everybody's dismay, it kept them in the find layout, but in Browse Mode, and they would try clicking on the Find button to get back into Find Mode, but of course, it did not take them there, it just repeated their previous find.

How would I get around this? Also what does "# do not restore find requests #" mean?

  • Author

I had tried making a separate layout for finding, but ran into a problem whenever a search would yield no results. If you click Continue, there was no problem, but many of the users thought that the Cancel button would take them back to the orginal layout. Much to everybody's dismay, it kept them in the find layout, but in Browse Mode, and they would try clicking on the Find button to get back into Find Mode, but of course, it did not take them there, it just repeated their previous find.

How would I get around this? Also what does "# do not restore find requests #" mean?

Elwood:

Put this immediately after your Perform Find[] step:

Set Error Capture [On]

If [Get(FoundCount)=0]

Go To Layout [your browse layout]

# You can also put ShowMessage[] in here to tell the user that no records were found.

Exit Script

End If

The rest of your script would continue as before.

-Stanley

Elwood:

Put this immediately after your Perform Find[] step:

Set Error Capture [On]

If [Get(FoundCount)=0]

Go To Layout [your browse layout]

# You can also put ShowMessage[] in here to tell the user that no records were found.

Exit Script

End If

The rest of your script would continue as before.

-Stanley

Elwood:

Put this immediately after your Perform Find[] step:

Set Error Capture [On]

If [Get(FoundCount)=0]

Go To Layout [your browse layout]

# You can also put ShowMessage[] in here to tell the user that no records were found.

Exit Script

End If

The rest of your script would continue as before.

-Stanley

  • Author

Thanks, it worked great. I think I'm going to go with the separate find layout, but bikergeek's advice was also helpful. Thanks again.

  • Author

Thanks, it worked great. I think I'm going to go with the separate find layout, but bikergeek's advice was also helpful. Thanks again.

  • Author

Thanks, it worked great. I think I'm going to go with the separate find layout, but bikergeek's advice was also helpful. Thanks again.

  • 4 weeks later...
  • Author

I've been refining this Find Layout discussed earlier, and some users have asked me for a button or method that would allow them to Exit Find Mode. I put a button that runs a script that should do so, but for some reason, the user has to click "Continue" on the Status Area. Normally, I like to have this hidden. As soon as the user hits "Continue", it takes them back to their original layout, and all is fine. Is there a script step that can automatically continue the script without user intervention?

For what it's worth, my script may be of help.

Before I hit the search button on one layout, I have a drop-down menu that allows the user to select a date (e.g. Today, Yesterday, Last 7 days, last 14 days, etc). Part of the script goes:

If [MAIN::gSearchDate="Today"]

Set Field[infringements::Date;Get(CurrentDate)]

Else If [MAIN::gSearchDate="Last 7 Days"]

Set Field[infringements::Date;Get(CurrentDate)-7]

etc

etc

End If

gSearchDate has a value list of terms (Today, Yesterday, etc) & Infringements::Date is a field on my search layout.

On the same layout as the above drop-down menu, I have a button which takes the selected date and enters it to the Date field on a dedicated search layout: The script for my Begin Search button goes as follows:

Allow User Abort[Off]

Set Error Capture[On]

Go To Layout[your dedicated search layout]

Enter Find Mode []

Perform Script[EnterSelectedDate] - enters date drom dropdown menu to Date field on Search layout

Pause/Resume Script[indefinitely] - enter other data, then click Continue

Perform Find []

If Get[FoundCount]>0

Go To Layout[search results layout - list view]

Else

Show Custom Dialog["Unsuccessful Search","No records found]

Show All Records

Go To Layout[Name of layout you want to go to]

Exit Script

End If

Hope this is of use

Frank

Elwood, this one isn't too hard... just make another script name it something like, cancel_sendTo that will take them to the layout you want them to return to. Then make a button on the find layout and perform that cancel_sendTo script, now in the define button menu, when you select perform script, there is a pull down menu, that says "halt" current script. Just set that to exit. What that will do is exit the find script and then perform that new cancel script sending the user to where ever or what ever you want in the new script.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.