Nintex Workflow - Auto Select Choice Field Metadata Values


Badge +5

Hi,

I have a Nintex workflow that pushes data from list to another list and am trying to find a way to auto-select the choice fields.

Here is what happens:

List A (workflow initiator): Has basic project information (implementation types, type of project, etc)

List B (item gets created in): Where we store the resources of each project

List C (secondary list that has events): Based on the unique ID from List A this list is queried into the form and pushed over.

List C looks like the following:

ProjectĀ Ā Ā Ā Ā  Event NameĀ Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Planned Start

AlphaĀ Ā Ā Ā Ā Ā Ā Ā Ā  StartupĀ Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  1/1/2011

AlphaĀ Ā Ā Ā Ā Ā Ā Ā Ā  Internal DesignĀ Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  6/1/2011

AlphaĀ Ā Ā Ā Ā Ā Ā Ā Ā  ImplementationĀ Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  8/2/2011

Now when the item in List B is created the Event Name from List C is written into a choice field within the form where the resources can check off which events they are attending. Example is below:

What I'm trying to do here is to have those values auto-selected so users can just uncheck the events they are not attending. Thoughts?

Thanks,

Greg


21 replies

Badge +11

Where in the workflow would the defaults need to be set? During the time the workflow initiator is entering data? It is still a little unclear.

Badge +5

Hi Burkslm,

Yes - it would need to be defaulted (set to checked) when the item is created.

-Greg

Badge +11

You need to create a workflow.Ā  In the workflow settings have it set to run when 'item is created'. See ifĀ  you can use the 'set field' action to set those checkboxes.,

Badge +5

That's what I've tried doing for both set field and update item, but it comes across unchecked.

Is there a way to populate it via inline functions? or some other formula?

Badge +11

Did you set the value to true/false or yes/no?

Badge +5

I wish it were that simple but since I'm pulling the data from a third list and pushing over based on the tying Unique ID I can only use the update multiple items option, which doesn't give me an option to set the default values as true.

Unless I would need to go into the list and set them as true there (it's a choice field though, not a yes/no field)?

Badge +7

Hi Greg,

Is there a set list of event names that apply to all projects? Or is it more dynamic than that?

Thanks

Jan

Badge +5

Hey Jan,

The Event Name field is actually free text - allows us to distinguish each specific event. We have another field called Event Type that is hardcoded and has limited values that can be selected, but this field doesn't need to be included in the workflow.

Reason being we could have multiple activations we are keeping track of and would have the following setup:

Event NameĀ Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Event Type

Activation 1Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Activation

Activation 2Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā Ā  Activation

This allows us to see, in reporting, how many activations there were and what phase or type of activation occurred. For resourcing it will allow our associates to see which activation they need to be present at.

Thanks,

Greg

Badge +7

I reckon your best bet is to use a Nintex form on List B and add a Repeating Section control mapped to a new list column (Multiple lines of text formatted as plain text).

Then in your workflow you can format the xml to go into the new multiline text column something like the following:

<?xml version="1.0" encoding="utf-8"?><RepeaterData><Version /><Items><Item><ynEventSelected type="System.Boolean">True</ynEventSelected><txtEventName type="System.String">Event1</txtEventName></Item><Item><ynEventSelected type="System.Boolean">True</ynEventSelected><txtEventName type="System.String">Event2</txtEventName></Item><Item><ynEventSelected type="System.Boolean">True</ynEventSelected><txtEventName type="System.String">Event3</txtEventName></Item></Items></RepeaterData>

I've added 2 controls to the Repeating Section in the above xml, one is a Yes/No named ynEventSelected an the other is a Single Line text named txtEventName. The text field can be set to disabled on the form to stop users changing event names.

Hope that helps but let me know if this won't work for you?

Jan

Badge +5

Hey Jan,

We only have access to Nintex workflow, and are currently using InfoPath forms.

-Greg

Badge +5

Might be able to do that in InfoPath though. My other other question pertains to the workflow. How would that look? We do not have all of the workflow actions turned on so I'm wondering how I can go about this.

-Greg

Badge +11

Ughhhh....InfoPath forms!

Userlevel 5
Badge +9

If I've well understood all the conversation, in list B, there's a multi lookup column refering List C. Is that correct ?

If it's correct, in the workflow, you can query all the items in list C which should be checked.

Then, for each item retrieved, add the following text to a text variable :

retrieved_item_id;#retrieved_item_title;#

Your text variable should look like this :

3;#Event 1;#4;#Event 2;#8;#Event 5;#

Then you can update the item created in list B and set the multi lookup column with the text variable.

Hope this helps

Badge +7

Hi Greg,

I'm no InfoPath expert but this article looks promising, Programmatically copy rows from a SharePoint list to a repeating node in the Main data source in InfoPath - BizSupportOnā€¦

Assuming you can create a repeating group in InfoPath you can then bind the choice control to it.

The workflow would be simplified if you could get this approach to work as you'd just need to capture the IDs of the list items you're targeting.

Jan

Badge +5

Hi Jan,

The developer tab is unavailable within our farm. It was turned off by the security team who do not want random associates developing code within the system.

Therefore if there is a way to do it, it must be done within the Nintex Workflow.

Caroline - The column in list B that needs to be updated is a choice field. List A is the initiator list and when a certain action occurs in List A then the workflow runs > looks at List C > updates choice column in List B for those that have the same unique identifier.

I've tried setting the choice fields to have a value, but the workflow takes it literally and writes in those values. I'll look more into your suggestion Caroline and see if I can somehow manipulate it that way.

Thank you everyone for the responses!

-Greg

Badge +7

Hi Greg,

Could you create a data connection using REST in InfoPath and change it dynamically to append a filter using a rule? You could then map the results into repeating node entries on your form.

The initial REST syntax would be something along the lines of, http://your_site_ListC_URL/_api/web/lists/GetByTitle('LISTC')/items

Jan

Badge +5

Hey Caroline - think I may be onto something here with your suggestion. One snag that I'm running into is that when I use the Query List action it seems to be only pulling back the first occurrence rather than all of them. However, it is setting the field to being checked.

Is there some way within the CAML editor that I could write it so it looks at the entire list rather than the first occurrence?

Hey Jan - I'll take a look at that if this falls through.

Thanks again.

-Greg

Userlevel 5
Badge +9

Cool happy.png

With the query list action, you should connect the columns to retrieve to collection variables (instead of text variables).

Tell me if this enables you to get several items.

Badge +5

Ok so I'm pulling all of the values in through the collection and have a For Each running too. However, I don't think I fully understand the "Add text to text variable" component. How would I go about this? Is this something that is done within the For Each Loop?

Badge +5

I was able to figure this out with the For Each statement and Regular Expression Replace Text! Thanks again for the help.

-Greg

Userlevel 5
Badge +9

Cool, great news!

Reply