This topic contains 5 replies, has 0 voices, and was last updated by Anonymous 11 years, 6 months ago.
- December 4, 2009 at 3:09 am #367
Hello, I have a table with 5 columns and 25 rows.
the first column is text the 2nd, third, forth and fifth and check boxes.
I need for each row to set at least one check box as mandatory, have tried but no luck.
ThanksDecember 4, 2009 at 10:32 am #4937
you can’t of course use the ‘mandatory answer’ on the table as that will only check to see that table HAS been answered and won’t know what was done in each Row
but running a behaviour on the appropriate event (maybe in your case the ‘table row has lost focus’) that then checks to see at least one of the check boxes is checked, and if none are then ‘show message’ to user may do what you need
Alternatively you could run this validation elsewhere where you can programatically check each row one at a time.
Refer to the user guide about working with tables:
The sub section explaining the SetTable Row function would be relevant here and will give you a lot of control on how you can manage tables
Having said that, where you say this table has 25rows.. I wonder if you may be better off not using table but use Check Box Groups and text input fields where you will then be able to use the default ‘mandatory answer’ on the check box objectDecember 4, 2009 at 11:34 am #4938
Thanks Ian, I thought about doing away with the table and going the way you suggested with the check Box groups, but I wanted to get your suggestion on the table first.December 4, 2009 at 12:29 pm #4939
Guess it depends if you are ‘under pressure’ to get this done quickly? seeing how you could do this ‘validation’ in the table on a ‘row by row’ basis could be worth checking out as once you can see how that works (ie how you can ‘scroll through’ each row in the table and do things here like ‘check current row’) you will more than likely find that this ‘technique’ has so many other users that you may need in the future as you get to more complex processes, but for the ‘quick and easy’ if you need that, then setting up ‘groups’ using the checkbox object will be way to go.
if you do go to look at working in the table, I’d suggest that you don’t do it on this form where you probably have a lot of other things going on to start with, but set up a small ‘test’ form where you only have the table object.. then its quicker/easier to see what it does (ie you can just ‘preview’ the form and enter in some content and then run your ‘script’ under a ‘button’ on the form)December 4, 2009 at 5:06 pm #4940
O.k, I have made a table with 5 columns and 2 rows, the 1st column in a text field, the other 4 are check boxes.
On a row loses focus table event I have a set field object => select field => table
column2 current row => formula => table column2 current row => then ?
Am I on the right track?, if not, can you point me with a little more detail in the right direction.
Thanks TimDecember 6, 2009 at 9:29 pm #4941
Never mind, I more or less got it. Thanks. Tim
You must be logged in to reply to this topic.