Use multiline text box data to populate choice field

  • 28 June 2017
  • 6 replies
  • 151 views

Badge +2

In a Nintex form, I need the user to be able to enter items and then have those items be the choices in a choice field also on the form. That choice column will then be used within a repeating section.  I thought this would be easiest to achieve using a multiline text box but I can't figure out a way to make this happen.

I basically want the items the user types in to 'clone' over to the choice field box, if that makes sense.

Any suggestions?


6 replies

Userlevel 5
Badge +14

have you tried semicolon separated list of values?

see this https://community.nintex.com/thread/15319-checklist-based-on-value#comment-59806 

Badge +2

I figured it out!

  1. On the item form, they enter their options into a multiline text box field separated by commas
  2. They hit a Save button (not the Save & Submit), which starts a workflow:
    1. Regular expression to split options by comma and stores in collection variable
    2. Set a single line of text variable to the collection variable value
    3. Set a ‘multiple lines of text’ field (in list) to the single line of text variable (variable display option set to Choices, Comma Delimited)
  3. In the item form, add a choice control in drop-down list format and use the multiple lines of text field item property for the Choices

 

Granted, the choice field on the form won’t be saving the option that the user chooses to a list column; but it can still be manipulated via form data if necessary.

Badge +2

Got it, thanks!

Userlevel 5
Badge +14

‌, would you mind to share more details (screenshots)?

I somehow do not get what's the purpose of workflow...

it takes comma separated list of values from multiline text on input, does some magic that basically does not make any change with input and then writes the same comma separated list of values into same(?) multiline text filed.

as well, you fill in some field on form, then save and run a workflow. to execute workflow takes some time. so I would say you can  not instantly see workflow output within the same form.

Badge +2

Sure! Let me first explain why I needed this:

Our engineering division currently tracks all project design information in a very involved, multi-tab spreadsheet and they would love to convert the entire mess to SharePoint and use workflows to route everything. Each design section is currently a tab within the spreadsheet with six tabs in total, and each tab requires separate feedback and approvals.  Also, not every tab is used on every project; that is determined by project cost and complexity. 

For the design I am using 'tabs' and panels with rules applied in order to display one section at a time. In one of the sections, the project leader needs to enter possible design options, criteria and comments on how each interacts. The messy part is that there can be a random number of options AND a random number of criteria, so these need to be dynamic.

In order to 'clone' the options and criteria into the choice fields, I added a button tied to javascript that saves the data and refreshes the page; this button also kicks off the small workflow that 'clones' the data. It runs in the length of time it takes to refresh the page, which is nice.

The choice fields and comments (single line of text box) are all housed in a repeating section so that the project lead can add as many combinations as they need. That data I am leaving as form data and will then be able to display it in whatever format I need, thanks to Vadim Tabakman's post on parsing the XML to display it (Displaying Repeating Section Data in List Views, The Easy Way! ).

Here is the form set up for this particular section:

205175_pastedImage_8.png

In the workflow:

205179_pastedImage_12.png

205176_pastedImage_9.png

205177_pastedImage_10.png

205178_pastedImage_11.png

And here is the set up on the Options Choice form field:

205180_pastedImage_13.png

Hope this explains everything a bit better. happy.png

Userlevel 5
Badge +14

ok, I see now.

thanks.

Reply