My workflow have to access the field_xx(1-20) to send a mail. Is it possible to dynamic access these fields with loop or something?
Otherwise, do i have to definite condition for each fields?
Solved! Go to Solution.
I find "Build String" and it is able to retrieve specific field value dynamically.
I am able to loop in above activity to retrieve field value, but when I try to write back to item using the activity "Update Item", it does not support specifiy the field dynamically. Field list in Action tab only shows item's field.
Is it impossible to specifiy the field such as workflow variables?
You can generally use variables in conjunction with the Update Item, but it depends on the backing field type in your list. For example, select the "Title" field and you should see that the reference button appears next to the Value field that allows you to select a variable. I believe this button is unavailable for fields such as "Lookups" where it would make more sense to use the Lookup value from the dropdown options instead.
Oh ok, I believe I misunderstood the question: I thought you had meant updating an existing field with a dynamic value within a variable, but it appears that you want to create a field dynamically from a variable?
Hi Mike san
thank you for your reply. I want to choose the field dynamically, then update its value.
I do not want to create a new field, but I just specifiy it in the field list. However this activity requires the update field before program will runs.
I am kind of unclear about what you are trying to do. But you can use the Query List action to query whatever field you want and put it in a collection variable. Then you can loop through that collection. Then use the update item using your collection.
If the field already exists but you want to dynamically update a given field using the Update Item action then this is going to require a bit of work. You'll have to do a series of run if, or a switch statement depending on the value of your variable, and then have one Update Item per field that you want to update depending on your "field" variable value.
Like burkslm mentioned, it might be helpful to post your workflow for a better understanding.
Come to think of it, if you want the field to be dynamic, then it'll be better to use a web service to do this so that you can make the field name dynamic.