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

Hi All.

 

I would be very grateful if someone could help me with the following please: -

 

I have 3 buttons on a layout in List View each with scripts attached and performing the following: -

 

Button 1) - Find

Enter Find Mode []

 

Button 2) - Perform Find

Perform Find []

 

Button 3) - Cancel Find

Perform Quick Find [Projects:: Consultant = Get(AccountName)]

Sort Records [Restore; No dialog]

 

 

On cancelling any find I perform, I want the form to list/show only those records where the field 'Consultant' equals the account name the user has logged on with.

I get the message "No records find this match criteria"

 

I have tried creating a global field and crating a calculation Get(AccountName) and trying the following script also but still it doesn't work: -

 

Button 3) - Cancel Find

Perform Quick Find [Projects::Consultant = Consultants Directory::Global Account Name_c]

Sort Records [Restore; No dialog]

 

I hope I have explained this clearly

 

Cheers

Steve

 

You don't specify a field for the Perform Quick Find command, only the search term (or an expression that evaluates to a search term).

 

To have a field included in a Quick Find, you need to “Include [it] for Quick Find” in the Data tab of the Inspector.

 

So, include Projects::Consultant for Quick Find (and maybe exclude the other fields on the layout from it) and use:

Perform Quick Find [ Get ( AccountName ) ]
  • Author

Eos,

 

Thank-you, checking the 'Include [it] for Quick Find” in the Data tab of the Inspector and removing the field in the command worked a treat.

 

Thanks Again.

 

Steve

Or maybe use Perform Find[] instead of Perform Quick Find []. If you have any other fields enabled for Quick Find on the layout, performing a "regular" find will be both quicker and more reliable.

 

Note also that Quick Find searches only fields that are on the current layout and are enabled for quick find. If the field is not on the layout (or if you remove it at any point later) you will get the aforementioned error message.

  • Author

Hi Comment

 

I tried the Perform Find[] and that method doesn't seem to work. 

 

An error message pops up saying "No records match that find criteria" and the 'Consultant' field highlights with 'Get(AccountName)' displayed in it.

 

Steve

I tried the Perform Find[] and that method doesn't seem to work. 

 

Well, it depends on how you tried it. How about this way:

Enter Find Mode []
Set Field [ Projects::Consultant ; Get (AccountName) ]
Perform Find []
Sort Records [ Restore ; No dialog ]

Or, if you prefer:

Set Variable [ $acct ; Get (AccountName) ]
Perform Find [ Specified Find Requests: Find Records; Criteria: Projects::Consultant: “$acct” ][ Restore ]
Sort Records [ Restore ; No dialog ]
  • Author

Haha, brilliant!!!! that works also.

 

Could I ask for your help for one last thing please.

 

I applied your 1st lot of script to the 'On Layout Enter' of my Layout so that it finds the relevant records depending on what account name you log on with.

If no records exist or have been created however I get the error 'No records match this find criteria and the option Buttons 'Modify Find', 'Continue', 'Cancel'.

 

Selecting 'Continue' shows no records on the layout which is what I would like it to do as obviously no records exists at this point.  Selecting 'Cancel' shows all the records that may not be associated with that account.

 

How do I get it to just show no records without the message box / option buttons?

 

Steve

Have a look at the Set Error Capture[] script step.

  • Author

Hi Comment

 

Thank-you for pointing me in the right direction, have been having a play around with it and this seems to work great: -

 

Set Error capture [On]
Enter Find Mode [] 
Set Field [Projects::Consultant ; Get (AccountName)] 
Perform Find [] 
Sort Records [ Restore ; No dialog ]
If [Get(FoundCount) = 0]
Show Custom Dialog ["No Records Have Yet Been Created"] 
End If





Thanks again

 

Steve

 

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.