Dropdown of columns

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.

1 Like

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.

1 Like

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.

1 Like

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.

1 Like

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.