January 16, 200620 yr 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?
January 16, 200620 yr 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.):(
January 16, 200620 yr 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
January 17, 200619 yr Author Well does anyone know how to write this script? I sure can't figure it out.
January 17, 200619 yr 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 [] ...
January 18, 200619 yr 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?
January 18, 200619 yr 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.
January 18, 200619 yr 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?
January 18, 200619 yr 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.
January 18, 200619 yr 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 ?
January 18, 200619 yr Just "Notes Day 1" with the script I gave above, except that the layout will be the search layout.
January 18, 200619 yr 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