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 Through Script

Featured Replies

  • Newbies

I am trying to set up a Find using a script.

I cant' get the selected search field into the find.

Some pseudo code...

Set Variable [ $SearchFieldSelect , Value:"Field_Name" ] #--- Field_Name Set by Calc (not shown)

Enter Find Mode[]

Set Field By Name [ Get ( LayoutTableName ) & $SearchFieldSelect ] #--- This does not work

New Record/Request[]

#--- Other Find stuff...

Perform Find[]

I tried adding the colons for the Table name with:

Get ( LayoutTableName ) & "::" & $SearchFieldSelect

In the Set Field By Name step, but that didn't work either.

What am I missing?

Thanks,

SC

You're not missing anything.

The script works correctly as written, given proper values.

tested ( "Value" is a field name in my table)

Set Variable [ $fn; Value:"Value" ]

Set Variable [ $tbl; Value:Get(LayoutTableName ) ]

Enter Find Mode [ ]

Set Field By Name [ $tbl & "::" & $fn; ">5000" ]

Perform Find [ ]

Result: proper found set for find request.

  • Author
  • Newbies

Bruce,

Thanks for your analysis. It helped me get unstuck.

Below is what I got to work.

##--- More of IF and Find above...

Else If [ System::gAccountSearchFieldSelect <> "ALL" ]

#---- Set Up 1-Field Find

Set Variable [ $SearchFieldSelect;

Value:Case(

System::gAccountSearchFieldSelect="Account Name";"Account";

System::gAccountSearchFieldSelect="Category";"Account_Category";

System::gAccountSearchFieldSelect="Type";"Account_Type";

System::gAccountSearchFieldSelect="ID";"ID_Account";

System::gAccountSearchFieldSelect="Shipping City";"Shipping_City";

System::gAccountSearchFieldSelect="Shipping State";"Shipping_State_Province";

System::gAccountSearchFieldSelect="Billing City";"Billing_City";

System::gAccountSearchFieldSelect="Billing State";"Billing_State_Province";

"") ]

Set Variable [ $CurrentLayoutName; Value:Get ( LayoutTableName ) ]

Enter Find Mode [ ]

Set Field By Name [$CurrentLayoutName & "::" & $SearchFieldSelect; System::gAccountSearchTarget ]

New Record/Request

End If

###--- More of Find below...

I used the Case statement for readability issues.

SC

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.