1 of 1 people found this helpful
I suggest you take a look at the FieldNames function. This returns the names of all fields on a given layout.
Build a layout that has all the fields on it you want. Then use FieldNames to fetch a return-delimited list of the field names. You can then loop over the list and use your calculation above to test each one for the presence of your desired string.
Mike's suggestion will steer you in the right direction in the short run, but I think your table structure could stand to be revised if this is something you'd like to keep using for a long time. It sounds to me like you have a table where each record represent's a student's To Do list, and different fields in that table store the different completion statuses for each task. You'll eventually be better served by moving each task to a separate record in a different table and creating a relationship between ToDoLists and Tasks. This is called data normalization, and it will let you do things like assign different tasks to different students, or change the tasks on the to do list over time without wiping out the older data. Any introductory book on FileMaker will describe how and why to do this in more detail.
Hers's a script that should work
Go to Layout[ Relevant fields layout ] *create a layout that has just the relevant fields*
Go to Field [FieldA] *FieldA is the first field in the tab order
If( Get( ActiveFieldContents)= "URGENTLY NEEDS COMPLETING"
Set Variable [ $fields; $fields & ¶ & Get ( ActiveFieldName)
Exit Loop If [Get ( ActiveFieldName) = "FieldZ" *FieldZ is the last field in the tab order*
Go to Next Field
*$fields will be a list of fields. Add script steps to do what needs to be done with the list
Go to Layout [original]
If you don't want to use a variable, you could substitute a field for the variable and use the Set Field step.
This is the exact problem that I am also dealing with, my fields are all calculated values. Will the process still work on fields that have a calculated value?
Without knowing more details about your solution in particular, I don't see why not.