Skip to main content
Nintex Community Menu Bar
Solved

For each item in a collection : take only the integer values

  • October 8, 2022
  • 2 replies
  • 154 views
  • Translate

Hello

 

I am struggling finding the right approach for my issue. I have a form with a multiselect list. I run a workflow on that form and split the multiselect value string into a collection. I want to be able to loop the collection to keep only the integer.

 

The result of my multiselect list as the following format : id;#text;#id;#text, because it comes from a lookup to another list. I want to loop through the collection and keep only the id as I create a new item in another list for each, and I need only the id.

 

So basically, I am trying to find a way to loop with an increment of 2, or to check the data type to be an integer.

 

Could you help? Thank you!

Best answer by Garrett

Hi @KainSkybrace 

 

Why not consider using a Calculated Field on the Form to do the clean-up for the Lookup Field?

Place a Calculated Field to the form. Use the formula parseLookup to perform the clean-up.

Since you wanted just the ID returned, use the formula => parseLookup( List Lookup, false )

 

List Lookup is the name for the Lookup control

1st Result. Formula is => List Lookup

2nd Result. Formula is => parseLookup( List Lookup )

3rd Result. Formula is => parseLookup( List Lookup, false )

 

Save the Calculated Field result to a SP column/field. 

View original
Did this topic help you find an answer to your question?

2 replies

Garrett
Forum|alt.badge.img+16
  • Scout
  • 904 replies
  • Answer
  • October 8, 2022

Hi @KainSkybrace 

 

Why not consider using a Calculated Field on the Form to do the clean-up for the Lookup Field?

Place a Calculated Field to the form. Use the formula parseLookup to perform the clean-up.

Since you wanted just the ID returned, use the formula => parseLookup( List Lookup, false )

 

List Lookup is the name for the Lookup control

1st Result. Formula is => List Lookup

2nd Result. Formula is => parseLookup( List Lookup )

3rd Result. Formula is => parseLookup( List Lookup, false )

 

Save the Calculated Field result to a SP column/field. 

Translate

That is a brilliant idea, thank you!
Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings