I am down to another challenge that is popping out at me with Parameters.
I have a Form that produces a Orders Table.
I want to have the Orders Table provide the parameters using the Table Row to Variables Loop Start and Loop End.
The form will collect variables that will perform calculations to produce a Dataset. Each Row in the Table is to be a Parameter of 7 or more variables.
How does one set that up? I am looking at a example below that appears to have 1 parameter, but I need about 15.
I moved your question to new topic as it seems to me it is not so much related to the previous matters discussed.
The example you are looking only has one parameter (1 flow variable for each row) because there is only one column in Table Creator node. If you have multiple columns you will have multiple parameters in each iteration which can then perform calculations to produce a desired data set.
After updating with integer instead of string (Thank You), I am still having a challenge with a (If Condition).
Currently, I have…
a=column("pro_Arg1")
b=column("pro_Arg2")
c=column("pro_Arg3")
v=column("Value")
q=column("QTY")
if(isMissing(c))
q = (a)+((b)*(v))
if (a > 0)
q = (a)+((b)*(v)+(v/c))
round(toDouble(q),2)
q
But this is not giving me good results. I am certain my format is wrong. What if “c” is missing and
a > 0? I think this is where it is bombing out to give me 0 instead of a value.
" Please advise.
Yes, I can explain the logic.
Here we are creating variables from the dataset and I am naming them a,b,c, v, and q.
If variable c is missing or “0” or blank I use the equation q = (a)+((b)(v))
else
I use the equation q = (a)+((b)(v)+(v/c))
as long as a > 0.
As I type this response, I am thinking that instead of having If (a > 0)
I can replace this with else.
If a = 0, that would not hurt the equation at all. In the above missing c, I was avoiding a division by 0.
P.S. How are you executing the “Preformatted text option”?
I do understand, and that is perfect. I am testing the formula by saying that if a = 0, adding 2 to the equation, should result in a value of 2, and 0 if we add nothing.
5 if we add the value of 5 and 0 if we add nothing etc.
However, The value is not adjusting to the different logic I am applying to the formula
q = a
to be honest not sure what is the status of your testing now
I will try to explain logic. First if is for a values higher or equal to zero. So if a = o you will go there. Then it depends on c value. If c is different than missing and zero you will use first formula (q = a + b*v + v/c). Otherwise second (q = a + b*v). If a is smaller than zero you will have last formula calculated (q = a).