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

Question

Question

When using web-sourced XML to populate drop down menu, only the last iteration shows

asked on September 12, 2022 Show version history

I've searched and I haven't found a problem that is what I am experiencing. 

Using a test workflow and test form, I am attempting to pull the sample XML from this Source, and have the data populate a drop down for selection/storage.  This is a proof of concept for Workday integration down the road.

Problem is, even though I have a "For Each Value" loop, I am only getting the last iteration in the drop down, and not a full list.

I do know all values from the sample XML are being processed, because I have an email sent out for each iteration and they all come separately. 

 

Is it possible to use ReadXML and %(ForEachValue_Iteration) to populate a drop down with multiple options?

 

Thanks to all in advance.

 

 

XMLWorkflow1.JPG
XMLWorkflow2.JPG
XMLWorkflow3.JPG
XMLWorkflow4.JPG
XMLWorkflow1.JPG (67.02 KB)
XMLWorkflow2.JPG (93.09 KB)
XMLWorkflow3.JPG (65.71 KB)
XMLWorkflow4.JPG (31.75 KB)
0 0

Answer

SELECTED ANSWER
replied on September 12, 2022

Hi Brian-

I think the Set Business Process Variables activity behaves a little differently than you are expecting. Basically, it's setting a single value for a given process. If you need to dynamically make a number of upload options available for a list, you might have better luck writing them into a lookup table. You might need to set up a column with a unique ID if you need to ensure that users can only select from their own process-specific list.

2 0
replied on September 12, 2022

Pieter is correct. Set Business Process Variables doesn't set the "options" it sets the current value of a field.

It can't be used in a loop either, but that's not really a factor in this scenario.

0 0
replied on September 13, 2022

You could set a token to the value of the current iteration and then use that token value in the set business process variables activity.

1 0
replied on September 13, 2022

Thanks to all who responded. 

 

James, from my understanding, I would have to create a token for each iteration correct?  If so, I need it to be dynamic like Pieter explained - I don't know how many XML values will be coming in from the future XML source.  If I am off base, let me know, I'd love to use this suggestion.

 

 

0 0
replied on September 13, 2022

Pieter, do you know of a way to write to a .CSV file from workflow?  That way I could make it an ODBC data source and use that inside forms for a lookup source.

 

Or were you implying a SQL table?

 

Thank you!

0 0
replied on September 13, 2022

Brian,

A SQL database would be far superior and much easier to implement. A CSV via ODBC has severe limitations, like only being editable by a single thread.

SQL is much more robust, and you can use the built-in database insert activities so you won't have to worry about writing any scripts.

If your workflow is associated with an already-active forms instance, then you could get the instance Id in your workflow.

Then, insert your values into the SQL table with the Instance Id as one of the columns.

Back in the form, add a hidden field with the Instance Id as the default value and set that as the lookup parameter to populate your dropdown options from the SQL database.

Then you would have a set of options specific to each instance if that's what you're going for.

1 0
replied on September 13, 2022

Thank you for the response.  SQL databases here are not under my control and require a lot of questions and getting through red tape to be created. 

I will engage the department that oversees them and request a test DB.

 

0 0

Replies

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

Sign in to reply to this post.