1 of 1 people found this helpful
Which workflow are you using? I mean are you on AR Server - Filter or Innovation Suite - Process?
As you mentioned Set Field I assume you are using AR Filter.
You can create Filter on Submit/Modify on given Form, use "Run If Qualification" of filter to specify If condition and add action set field in "If Actions" to set the field value = Yes. And in same Filter you add set field action in "Else Actions" to set the field value = No. In this case when condition evaluates to true, server executes "If Actions" else it executes "Else Actions"
Sorry I forgot the plattaform version AR Server 9.0.00.002, so Developer Studio 9.0.00.
Thank you for the answer
2 of 2 people found this helpful
You just described both an Active Link and a Filter....the Run-If qualification is the If, and you can have both if actions and else actions. So....based on your specific request...no.....but, with two pieces of workflow, the first that gets the value and sets a temp field, and a second piece of workflow that does the if/then/else.
As Lj said, you put all of you object in just one line.
your run if is 'field' = "green"
then you run a set field action with change field.
I do not remember if filter has Change Field action. For me, active link makes more sense, because it is a change for current user.
If you need, we can put an example here.
1 of 1 people found this helpful
In case you meant that Run If Qualification has already steered workflow into If Action(s) and you wish to implement "if then... else" within that branch, you may still be able to use Set Fields action to achieve this.
If you prepare back-end form with precalculated values (e.g. record with 'value of A' = "green" would also contain 'response' = "Yes", record with 'value of A' != "green" would contain 'response' = "No"), you could use Set Fields action to fetch response from your back-end form using ($A$ = "green" AND 'value of A' = $A$) OR ($A$ != "green" AND 'value of A' != "green") as qualification; it could be simpler ($A$ = 'value of A') if valid set of values of A is finite, but you'd need a record for each possible value.
Obviously, I presume that initial value of A is available throughout the whole branch -- otherwise, it would have to be stored in temporary value as LJ LongWing suggested.
3 of 3 people found this helpful
There are many ways to solve this.
There are many times when I avoid having several filters/active links that are doing several "elses" for setting a field. As someone already mentioned, you can have it do a data-lookup to mapping table, or if you just want quick and dirty -
You can do a SQL set fields action with a case statement in it. Just select from nowhere ("from dual" in oracle)
when 'remedy field' = 'Red' then 10
when 'remedy field' = 'Green' then 20
when 'remedy field' = 'Blue' then 30
And then set the field you want with $1$
All suggestions are good, my purpose was to don't create a field to hold a value, but check it at "run time". Anyway my environment has now a new field
So, If you do not want to hold the value (in the db), you can use a display field, right?
Yes. You can use a display only field for interim processing if you need to temporarily hold a value.