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

Question

Question

workflow assign field value add null fields to field group

asked on September 18, 2017 Show version history

I am trying to use the Workflow Assign Field Value activity to update Field Groups.  The group has 3 fields and only 2 will have a value.  I have a loop to populate the field group multiple times.  The workflow completes without any errors, but when you go in and view the metadata on the document, the fields are not matching up properly because when the Date value is null, it is not placing a null placeholder in the multivalue date field.

 

Field Group on template

    -Field A (String)

    -Field B (String)

    -Field C (Date)

Say I have 3 groupings of

    -Field A = Value 1

    -Field B = Value 2

    -Field C = Nothing

 

    -Field A = Value 3

   -Field B = Nothing

    -Field C = Value 4

 

    -Field A = Value 5

    -Field B = Value 6

    -Field C = Nothing

We end up with this on the document

 

    -Field A = Value 1

    -Field B = Value 2

    -Field C = Value 4

 

    -Field A = Value 3

    -Field B = Nothing

    -Field C = Nothing

 

    -Field A = Value 5

    -Field B = Value 6

    -Field C = Nothing

 

How are we to apply dates in the Field Groups in workflow so they end up in the proper groupings?

In my Workflow, I create tokens (A, B, & C) and populate the values from a lookup, but either B or C will be null.  Then in the assign Fields, I append value to each of the 3 fields and set them to the token values.

0 0

Replies

replied on September 18, 2017

I did more testing and moved the Date field so it was the first field group to populate and the problem flipped and was seen on the string field as well.  I then applied the first field group with bogus data in all 3 fields, and the following updates lined up as they should.  What I have found is that the null placeholders are not set until after a non null value is assigned.

Can someone please confirm this bug?

0 0
replied on September 19, 2017

Are you setting the fields to "append" or "replace"?

0 0
replied on September 19, 2017

The fields are set to append.  If they where set to replace, all I would end up with was the last group of data that was assigned (and overwrote all existing data).

0 0
replied on September 19, 2017

In your loop, do you assign a "row" of fields at every iteration? The multi-value field group handling kicks in when assigning multi-value tokens. So I think if you loop and build a multi-value token for each column in your results set and then assign it all at once after the loop, you'll get the desired behavior.

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

Sign in to reply to this post.