Skip to main content

Hello again.

I’ve previously posted about another workflow in this project and now the scope of the project has grown to include yet another new workflow. Long story short: I am uploading a text file to a library and have a workflow that parses the data and either updates an existing item in the Account Number list or creates a new item. The workflow works just fine when updating text fields. I’m having trouble updating a Lookup field with the data that’s been parsed from the text file and stored in a text variable. I know how to configure a workflow to update a Lookup field when I create or update an item in List B with data from List A. I don’t know how to do it when updating from Text File to List A. I have to keep the field a Lookup field because it’s used to make the cascading dropdowns in my form. I have found many, many discussions about updating Lookup columns and the answers range from java script to Call Web Service actions, but I know it must be simpler than that. There must be a way to update or create an item with a Lookup column and populate that column with data stored in a variable. Any suggestions? And if you have the answer, can you provide some sort of explanation as to why it would work one way and not another? I’ve included a screenshot of a configuration that does not work.

186880_pastedImage_0.png

I do assume your where clause is configured correctly and identifies proper item to update....

what is the datatype of GBU field in GBU list?

have checked gbu_text contains correct/expected value?

have you checked gbu_text doesn't contain some leading or trailing spaces?

have you tried to supply some static value instead of gbu_text variable?


Yes, it finds the proper item to update. I've queried unique identifiers.

what is the datatype of GBU field in GBU list? Single Line of Text

have checked gbu_text contains correct/expected value? Yes, it contains the expected value.

have you checked gbu_text doesn't contain some leading or trailing spaces? It doesn't appear to. I put it in the body of a notification and it appears to be text with no characters or spaces.

have you tried to supply some static value instead of gbu_text variable? That works. I can type in a value that is one of the choices in the Lookup and it will update the field. When I try the configuration above with the variable, it doesn't error, but it doesn't update the Lookup field either.


I put it in the body of a notification and it appears to be text with no characters

I wouldn't believe that, spaces might have been stripped by mail agent or mail client somehow.

to be sure, I would try to supply value fn-Trim(gbu_text)

one more question, have you somehow changed variable return type (button with 3 dots)?


Hi! I just wanted to check in and say that I was sidetracked with a higher priority workflow and am finally circling back to this. I will try your suggestion and let you know what I find out.


This has been a fascinating learning experience! Trimming the variable is exactly what needed to be done and then it updates the field when the variable is configured as a string (the default setting).

The sticking point turned out to be the data going into my workflow. The .txt file needed some cleaning up and then my workflow functioned without a hitch.


Reply