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?
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.
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.
Hi Mike san
thank you for your reply.
The 'Field' list on below fig shows only fields in item, so I could not specifiy the field programatically.
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?
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.
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.
Hi Mike san
thank you for your reply. I wonder the web service can update the current item while workflow running.
If I adopt the web service, it have to update current item. Is it possible to this without any conflict?
The name of the WS is UpdateListItem, that should do the trick once you have it configured. I don't think there would be any conflicts.
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.
Maybe you should post your workflow so far.
Hi burksim san
thank you for your reply. I can not post our workflow for our corporate rule, sorry.
One more question, your recommended query list is able to get current item's field value while executing workflow?
Yes it can
Retrieving data ...