0
I'm creating an orchestration that will essentially loop through an "if then" using the decision step to compare each value in an array of values. However on the decision step I'm getting an error message when trying to use the ForEach index as the array control. Any ideas? (see attached screenshot)
Responses (8)
  • Accepted Answer

    Wednesday, March 01 2017, 05:14 PM - #Permalink
    0
    Just use your own numeric working data variable. Initialize it to 0 or 1 and increment it at the beginning or end of the for each loop.
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, March 01 2017, 06:34 PM - #Permalink
    0
    I tried that as well to no avail. I created a numeric variable called "loop" set to default of 0 and then in the "IncrementLoop" step I'm incrementing it by 1.
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, March 01 2017, 07:16 PM - #Permalink
    0
    Looks like this is defect D21079; however, the proposed workaround doesn't work. I setup a calculation step to set Forloop equal to ForEach\Index but the error persists. Unfortunately it looks like they closed this defect with a workaround.
    Attachments:
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 02 2017, 03:46 AM - #Permalink
    0
    Hi Curtis - sample Process App attached to demonstrate how to resolve. I also sent via your support incident.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 02 2017, 03:47 AM - #Permalink
    0
    Hi Curtis - sample Process App attached to demonstrate how to resolve. I also sent via your support incident.
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, March 02 2017, 06:40 AM - #Permalink
    0
    Jackie Gilmour wrote:

    Hi Curtis - sample Process App attached to demonstrate how to resolve. I also sent via your support incident.


    I got the sample process app, reviewed the orchestration, but I still have questions. I updated the case.
    The reply is currently minimized Show
  • Accepted Answer

    Friday, March 03 2017, 01:15 PM - #Permalink
    0
    Hmm mayhaps there is a better way to do this?

    Here is what I'm trying to accomplish when a specific transition is run on the Change Request Item:

    Compare a specific set of fields on the Change Request Item with the same set of specific fields on the Service Asset Item. If the field values are different update the Service Asset Item with the Change Request Item's values.

    The way I was originally going to do this was to fetch all the Service Asset Item's fields, look for the specific set of fields by comparing the dbname attribute to a set of hardcoded strings (e.g. "OS"). If they match, compare that fields value[]\displayvalue to the same field on the Change Request item's value[]\displayvalue, if they aren't equal pass the Change Request Item's field and value[]\displayvalue to a new working array which would then be used to update the Service Asset Item.


    I'm hoping someone has a better idea on how to do this...
    The reply is currently minimized Show
  • Accepted Answer

    Monday, March 06 2017, 05:50 AM - #Permalink
    0
    So I ended up going a completely different route to achieve my outcome, mainly using a compare step to set a boolean variable for each field based on the DB value, copy it to a fieldvalue variable, then run a series of decisions to compare the fieldvalue variable with the string sent via the event notice for the associated field.


    The entire orchestration is actually fairly lengthy so I've just attached a screenshot of a snippet of it.

    My only challenge now is finding a way to update a field on the Service Asset Item to be empty if it was changed to be empty on the Change Request Item.
    The reply is currently minimized Show
Your Reply

Recent Tweets