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

Question

Question

Retrieve from forms - Assign to token

asked on October 21, 2015

Hi,

I've got myself a bit of a strange issue...

I'm trying to retrieve some date values from a form and assign these dates to a token. The problem is that the assign token activity is not working properly.

I'll give you an example to try and explain the problem fully.

The retrieve from forms activity brings though the following dates for example. So far so good...

However the assign activity then fails for the value '28/10/2015' with the following error.

For the 2nd date '02/11/2015', the assign activity works, but the date is mixed up and appears as '11/02/2015'

Here is the section of my workflow where the issue is happening.

For reference, I've tested only bringing through one date, and using assign token values to that date, without using the 'For Each Row' iteration and there are no issues. This only happens when I'm using the 'For Each Row'. Any help, ideas, workarounds etc etc much appreciated, but I fear this might be a bug in Workflow.

 

0 0

Replies

replied on October 26, 2015

Hi Ronald,

When looping through the values of a multi-value token, "For Each Value" is the activity you'll want to use (For Each Row is intended to handle results of a data query). Also, I'm wondering if the loop is necessary at all: the values are already contained within a multi-value token (the retrievelaserficheformscontent token above), so they may not need to be moved to another token. 

If this doesn't solve the problem, could you give me a bit more info about your process? For example, how are the dates being input into Forms? Are they being input into a table? Also, what is Workflow doing with the date values? How is it processing them?

0 0
replied on November 13, 2015

I am trying to loop through a forms collection and so I was under the impression that 'For Each Row' is the way to do this so I can then process the data in each row that has been retrieved from forms.

The dates are being input into forms using a 'Date' field, allowing the user to select from a calendar. This date is in the format 'dd/MM/yyyy'. If only one date is input and just assign this value to a token along with the rest of the relevant data, there is no issue. It is only if I try to loop through the collection that this bug appears.

0 0
replied on December 7, 2015

If you're trying to move the retrieved dates (from Retrieve Forms Content) into a multi-value token, then you don’t require a loop – you can just create a new token and it assign it those values:

The results you get are as follows:  In my form, I’ve input three dates into a collection - January 28, January 29, and February 11. Below you can see that the Retrieve Forms Content activity picked up the values perfectly, as in your scenario, and the multi-value token then stored those three values:

While it did not throw any errors, this token assignment activity did flip the date format. It did so regardless of whether the token was formatted to be a string or date. Do you wish for the date to remain in the dd/MM/yyyy format? If so, I can talk to the developers to find out what’s needed. In the meantime, you can flip the format back manually.

To flip the date format, you will need a loop to go through each of the date token's values:

and use the token dialog to apply formatting to each value:

Doing so results in this token:

Is that the result you were hoping for?

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

Sign in to reply to this post.