I have a table with 20 columns, some of them are hiden from the user with a showif. Lets say i want my user to be able to select by himself which columns to have access to, can i create a dropdown in each row so the user can select these columns?
To clarify, im asking is there a way for my user to build his own form structure based on current columns, perhaps in user settings?
Yes you can do that and the Usersettings is a good solution. You could add an Enumlist field with your column names and then use something like IN(โColAโ,Usersettings(โShowColumnsโ)) with the Show? option.
To make it more complicated, lets say i want to have multiple forms. So i have a bunch of location IDs, i want a designated form for each ID. Guessing that is far reaching?
You could have one Usersetting field for one form. Though if you have lot of them like >10, then you should start to think a table for that purpose.
OK, iโm struggling with the first thing, using usersettings.
I have created in usersetings an enum with column name named forms.
what is the expression i should write in the showif?
If you want to choose multi columns in one field, you should use EnumList, not Enum. Then the formula would be IN(โColAโ,Usersettings(โShowColumnsโ)). Though you need to use own values and column names.
Works great.
Now if i may bother you some more, how would i create multi forms with a table?
Sorry, couldnโt understand your request.
You said that if i want more than 10 form settings i should add a table.
Do you have more than 10 forms?
My client may have
Then you would need to create a reference table where you have one record for one user per form.
To conclude
I have created a table with a column of form ID, for each form i assigned a site and a true/false select for column names.
When a user selects a form name there is a showif? That matches the data on my form table.
Thanks for your help as always
Yes thatโs one approach.
User | Count |
---|---|
41 | |
28 | |
28 | |
23 | |
13 |