You are viewing limited content. For full access, please sign in.

Question

Question

Is there a way to retrieve fields values dynamically?

asked on June 3, 2022

I have a table that tells me which field to retrieve based on the template assigned. Is there a way I can use the Retrieve Field Values activity dynamically to only retrieve this field?

For example:

1. Table returns "Contract Start Date" field when template = Contracts

2. Retrieve Field Value for Contract Start Date field

1 0

Replies

replied on June 6, 2022

You could do it with a conditional decision with a branch for each Template:

0 0
replied on June 6, 2022

You can retreive different field values based on what your query returns using a conditional decision activity. A different activity must be used to retreive the values though, so if you want to reference the result globally throughout the rest of the workflow, put the return value into a global token.

0 0
replied on June 6, 2022

Thanks for the responses guys. Unfortunately we have a whole bunch of fields, so conditional branches aren't the most efficient.

0 0
replied on June 6, 2022

It shouldn't be that much differnt than writing if else if over and over in a coding language. Having a lot of branches is not a bad thing, you can start a new conditional decision at any time to prevent the view from stretching too far horizontally.

You might be able to use a SDK Script acitvity to write a more convienent C# solution though

0 0
replied on June 6, 2022

I have a script that accomplishes this in one line currently, but was hoping for something more "out-of-the-box". Maybe putting a token of the field name in the Retrieve Field Values activity to get the field we want? Sounds like a feature request I guess frown

0 0
replied on June 6, 2022

I mean if it can be done better with code then maybe that is the best place to do it. That is what is great about workflow, you can write code or use the visual system, depending on the need.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.