We have a use case, where the user may select multiple people for multiple docum

We have a use case, where the user may select multiple people for multiple documents.
Example:
For “Doc a “ Selected users “user1, group2, user3”
For “Doc b “ Selected users “user1, user4, group6”
For “Doc c” Selected users “group3, user4, user9”
In this scenario the number of Documents may vary and we need to implement this in the User Input task or Form.
Problem : We can’t use multiple people picker in grid. Please let us know if you faced the same problem and work around or solution to this problem....

OriginalPostID-78389

OriginalPostID-78389

  Discussion posts and replies are publicly visible

  • One approach could be to have the document upload and multiple people picker in one form and loop the user back to this form if they want to add another document.
  • Sanjeev, grid is not the right data structure representation component for what you are trying to achieve. You are trying to make a row represent multiple rows. Obviously, one option would be to show a comma separated value but what I would recommend is to have a form that allows you to do this for each row in the grid and bring the user back to the main form and show the value in a comma separated fashion. Another advantage of this approach is that you can use paging grids and make the form mobile compatible. I hope this helps.
  • Thanks Venkatesh and Sathya for response.
    As suggested by you both, we need to loop back again and again for each document that user uploads. The suggestions are good but from user perspective it includes lots of clicks and it increases with the number of document upload. Is there any better approach such that user stays on a single form and add multiple people for each document?
  • In some of the projects, what I've done is provided the option to upload up to (say) 5 documents in a form and then click on the button to upload more if required. This will reduce the no of clicks by a factor of n - where n is the no of upload options you have in the form
  • and, of course, based on your use case and business requirements, you can add logic around this
  • Sathya, nice suggestion
    But what my team decided to do is something different. We are using JS to implement the logic. We added a section with a file up loader field, people picker and a JS button (added in onload event of the form). On clicking JS button we submitting the form (Using JS). Now we have the document and its multiple recipients. We can convert recipients to string and loop back to the same form. The data captured is shown into a grid. User may delete a row from grid if something wrong has been added or keep on adding multiple documents and its recipients. The user will be having a feel that he is using the same form as the form is getting looped back to itself. We can play with the same logic to do multi file up loader. Please let us know if there is any expected risk or issue in the logic.
    Besides JS isn’t recommended by the Appian some additional risk are.
    1) Can’t be used if JS is disabled in the browser.
    2) JS will add up to load time. Hence performance is affected.
  • Here is the biggest issue using JS. It's not Mobile compatible. So for that reason, I would recommend against it.

    Having said that, if you decide to ignore my recommendation and continue with JS, you can still use the logic of having multiple upload document fields in your form and instead of using a Form submit, you can look for on click event of the component to show the next upload document field (which will be hidden by default), repeat until you hit the last one where you do a form submit.
  • Can you please tell me how to upload multiple documents?