Jump to content

This topic is 6975 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

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.):(

Posted

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

Posted

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 []

...

Posted

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?

Posted

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.

Posted

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?

Posted

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.

Posted

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 ?

Posted

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

Posted

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.

This topic is 6975 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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