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.

Perform Find in Tab Control Layout

Featured Replies

I have a layout that runs a tab control setup for the 7 days of the week. Each day has a notes field. My problem is I dont know how to write a "find" script that will search across all 7 note fields. Anyone know how I can do this?

Use a script to use the find criteria from the first day, inserting it into a new request for each subsequent day. You do not need to change layouts (using Set Field.):(

  • Author

Can you give me a sample of what the script would look like? My fields are

Notes Day 1

Notes Day 2

Notes Day 3

and so no through Notes Day 7

  • Author

Well does anyone know how to write this script? I sure can't figure it out.

Try:

Go to Layout [ Notes Day 1 ]

Enter Find Mode [ Pause ]

If [ not isempty ( Notes Day 1 ) ]

Set Variable [ $Notes ]

New Record/Request

Set Field [ Notes Day 2 ; $Notes ]

New Record/Request

Set Field [ Notes Day 3 ; $Notes ]

New Record/Request

Set Field [ Notes Day 4 ; $Notes ]

New Record/Request

Set Field [ Notes Day 5 ; $Notes ]

New Record/Request

Set Field [ Notes Day 6 ; $Notes ]

New Record/Request

Set Field [ Notes Day 7 ; $Notes ]

End If

Perform Find []

...

There's something fundamentally wrong here with this structure. For one thing, even if the searched string is found, how will it be shown? For another, how do we know which tab panel is active - and consequently into which field did the user input the search string?

Yes, I think a dedicated search layout and possibly a dedicated result layout would be best. Without the dedicated search layout, you'd need to test the presence of find criteria in each tab panel, and use the one that has stuff, but then deal with the possibility of criteria in more than one tab panel. Not impossible, but it makes it unnecessarily complex and probably confusing for the user.

  • Author

SO how do we do "find" in a tab control layout?

I tried the script & you're right it dosen't work.

I cant be the only person that wants to use a tab control layout & needs to do "find" within that layout. How does everyone else get around this problem?

SO how do we do "find" in a tab control layout?

Same way as any other layout.

I tried the script & you're right it dosen't work.

Can you be more specific?

I cant be the only person that wants to use a tab control layout & needs to do "find" within that layout. How does everyone else get around this problem?

Some developers use dedicated search layouts that don't include tab panels.

  • Author

So on this dedicated search layout do I need 7 fields on to do a search? (for the 7 notes fields) ? I guess i'm not sure what to have on the dedicated search layout ?

Just "Notes Day 1" with the script I gave above, except that the layout will be the search layout.

The real problem is that you have used a flat file structure when relational was more appropriate.

That is, you have 7 "notes" fields, one for each day. You should instead have a related table with one "notes" field, and 7 related records.

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.