Hello, I've read through quite a few posts where a condition is not working but haven't found a solution that seems to fit my situation.
I want to copy a file to a different library based on metadata. If the "OU (Distribute To) field contains a 50, copy the file to a particular directory. Below are screen shots of my flow. I have one document in my library with that field set to 50 (it is a pick list if that makes a difference). I have tried using both "OU (Distribute To)" and "OU (Distribute To) Value" in my condition and neither worked. I tried putting the 50 in single and double quotes, still didn't work. What am I missing?
Thanks much,
Andrea
Full Flow:
Solved! Go to Solution.
Hi @Azenner1 ,
If the type of this field is Choice, then you need to use OU (Distribute To) Value in Condition.
You need to change "is equal to" to "contains".
In addition, you can check the Body of the Get files action, whether the value of OU (Distribute To) Value is a number or a string. If it is a string, then you can consider using the string() function to format 50 into a string value.
If the value of OU (Distribute To) Value is also number, then you may need to format both OU (Distribute To) Value and 50 as a string value for comparison.
Please take a try.
Best Regards,
What is the data type of that 50? Just had a similar item where I had to convert to string in the condition field. Might be worth a shot?
Alternatively, try to initialize a variable as string for the field that is being looked at and use that in your condition, comparing to string('50'). You may also just be able to enter string(*Distribute to Field*) is equal to string('50'). *Distribute to as dynamic content*.
I have seen some inconsistencies with flow when using certain fields in the condition content. Sometimes converting them to Base64 and comparing both values that way will give you insight as to what is actually being looked at. I just capture this as a variable and send it to myself in an email for easy review.
Example from my other post below for converting to string, but it should work similarly in your case (Hopefully?):
@Mike-M thanks for the tip. I added the string parameter and now the flow fails, which is progress I guess. It's still not finding the document. The error message isn't terribly helpful "ActionFailed. An action failed. No dependent actions succeeded."
Hi @Azenner1 ,
If the type of this field is Choice, then you need to use OU (Distribute To) Value in Condition.
You need to change "is equal to" to "contains".
In addition, you can check the Body of the Get files action, whether the value of OU (Distribute To) Value is a number or a string. If it is a string, then you can consider using the string() function to format 50 into a string value.
If the value of OU (Distribute To) Value is also number, then you may need to format both OU (Distribute To) Value and 50 as a string value for comparison.
Please take a try.
Best Regards,
Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!
User | Count |
---|---|
85 | |
58 | |
44 | |
38 | |
34 |
User | Count |
---|---|
91 | |
75 | |
74 | |
61 | |
41 |