You are viewing limited content. For full access, please sign in.

Question

Question

Disable entire collection row based on input/select

asked on June 28, 2017

I'm working on a form that will go out to multiple users depending on the options selected from a dropdown in a collection, but each row's data will be relevant to only certain users.  So if the initial submitter adds two rows to the collection and selects 'Option 1' in the first row and 'Option 2' in the second row, an inclusive gateway will send the form for approval to 'Approver 1' and 'Approver 2'.

I have that part working fine, but where I'm having trouble is that I would like for 'Approver 1' to only be able to manipulate fields on the row where 'Option 1' was selected with the others being disabled, and 'Approver 2' to only be able to manipulate fields on the row where 'Option 2' was selected.  The only similar issues I've been able to find on the site here were people wanting to disable specific fields, but I want to enable/disable everything in a particular row based on the selection in the first field.

I could just forsake some of the functionality that I want and make the entire form read only to the approvers, but besides not wanting to lose the functionality of letting each approver make changes to their relevant area, I'm tired of fighting all of the js that gets disabled when you make the form read-only.  I really wish it was possible to make the form read-only for the actual user, but still allow all of your js to run properly.

0 0

Replies

replied on June 28, 2017

Hi Dennis,

I've had a similar situation, and the way I solved it was by adding a hidden field to the form. I set the default value of the hidden field to correspond to the name of the current process step ({/_current_step_name}). Then I I used Field Rules to show the appropriate section of the form based on the value of that hidden field. So for example, if the name of the current user task was "Department 1 Review", then the field rules were set so that when the value of the hidden field was  "Department 1 Review", then the "Department 1" section of the form was displayed. In this way, each department was able to only see the section of the form assigned to them. This allowed me to have only 1 form instead of as many forms as departments.

I hope this makes sense!

2 0
replied on July 5, 2017

Thanks Joanna, I do have that exact same setup on this form, what I'm trying to do though is rather than hiding an entire section I want to hide or show specific rows from a collection.  So a collection row will have a dropdown menu and if a user selects 'A' from the dropdown, then adds a row and selects 'B' in that row, then I want the ability to either show or hide the rows based on whether 'A' or 'B' was selected in that particular row.  Honestly I don't care if the rows are hidden or not if I can disable them/make them read-only.  The form has to split to different departments for approval and depending on the information in each row I don't want every department to be able to manipulate the information in each row.

I'm sure I can come up with a simpler way to do this, it just won't look as clean.  Thanks for the response!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.