Kicker3 Posted January 16, 2006 Posted January 16, 2006 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?
Ender Posted January 16, 2006 Posted January 16, 2006 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.):(
Kicker3 Posted January 16, 2006 Author Posted January 16, 2006 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
Kicker3 Posted January 17, 2006 Author Posted January 17, 2006 Well does anyone know how to write this script? I sure can't figure it out.
Ender Posted January 17, 2006 Posted January 17, 2006 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 [] ...
comment Posted January 18, 2006 Posted January 18, 2006 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?
Ender Posted January 18, 2006 Posted January 18, 2006 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.
Kicker3 Posted January 18, 2006 Author Posted January 18, 2006 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?
Ender Posted January 18, 2006 Posted January 18, 2006 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.
Kicker3 Posted January 18, 2006 Author Posted January 18, 2006 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 ?
Ender Posted January 18, 2006 Posted January 18, 2006 Just "Notes Day 1" with the script I gave above, except that the layout will be the search layout.
Vaughan Posted January 18, 2006 Posted January 18, 2006 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now