Gold is to update 5 fields in Mysql table "Project" based on multiselecting in a table.
Following fields I want to update in the table "Project":
- AdminUserID (num) - only one AdminUserID can be added
- EditorUserID (num) - only one EditorUserID can be added
- EditiorUserNames (char) - Many names can be added
- ViewerUserID (num) - only one EditorUserID can be added
- ViewerUserNames (char) - Many names can be added
If more then one Editor is selected then EditorUserID shall be 0
If more then one viewer is selected then ViewerUserID shall be 0
User have a list of projects showing in a table "table_projects".
User have a button for each projects "add users" that opens a Modal
Example of the modal::
I have 3 input fields that shall show the names selected based on Role and separate users with semicolon or other symbols.
Example
Update button is disabled if user select more then 1 Admin, 3 Editors and 10 Viewers.
How can I use WHERE clause in the Default value with semicolon as separator when more the one is selected?
As I'm not a developer and new to retool I do not know how to do this in ReTool, MySQL or JavaScript. I have some Experian with PHP.
Is there anyone out there that can help me solve this?