jhomer Posted April 26, 2005 Posted April 26, 2005 I am trying to determine if a record in a survey I've created is useable. I only want to use records that have a said number of questions answered(well say 12 out of 14). I want to created a field that begins set to 0 and is then incremented by 1 each time a question field recieves data. if the value in this record is less then 12 the record will be deleted. i was looking to use the IsEmpty function as a way to look to see if the data fields contain actual data. however im not sure the best way to implement the increments. or if this is the best way to approach this problem. please, any input would be greatly appreciated
Inky Phil Posted April 26, 2005 Posted April 26, 2005 Hi Homer If you want to use the isEmpty function you could set up a numeric global called 'valid' and then script along these lines set valid '''' If isempty(field1) setfield valid (valid+1) endif If isempty(field2) setfield valid (valid+1) endif If isempty(field3) setfield valid (valid+1) endif etc. etc through to the end then if valid > 'your valid requirement' do whatever else do whatever else endif the syntax is not exactly correct but I am sure you get the idea HTH Phil ps there may be a much simpler way but I am not versed in 7 so forgive me if there is
jhomer Posted April 26, 2005 Author Posted April 26, 2005 is there a way to acomplish the same result without runnning a script? (along th lines of making the valID a calculation)
comment Posted April 26, 2005 Posted April 26, 2005 You could make a calculation (result is number) along the lines of: IsEmpty ( field1 ) + IsEmpty ( field2 ) + IsEmpty ( field3 ) + ... + IsEmpty ( field14 ) Result will be 14 if all 14 fields are empty, and 0 if all are filled (you can reverse the result by using 14 - (the formula)). Uncheck "Do not evaluate if all referenced fields are empty". But most likely the best approach would be to break out the questions into separate records in a related table.
Recommended Posts
This topic is 7153 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