17
Views
4
Comments
if condition range of values
Question

I am trying to make a list of items and set types to each of them.

So for example i want to assign number 1 to 40 to type A, 41 to 50 to type B. How do i write them in the If expression?

Count <=41 and Count >=50 did not work for me.

Hi Louis,


Kindly use "for each" over the list and inside that use the if condition to assign the value.


Regards,

LK

Rank: #97

Hi Louis Wang,


When you say you want to assign the number 1 to 40 to type A, you mean the first 40 records of the list?

If that is the case, you can use Current Row Number, which gives you the position of the record in the list (pay attention it is 0-based, so the first record has row number 0, the second 1, and so on).

You can see in this post solution, a very good step by step explanation on how to do that.


Hope it helps.


Cheers,

João

mvp_badge
MVP
Rank: #59

Use Switch Case for different type and put the checks in different node and assign it accordingly!


Regards,

-PJ- 


Rank: #5016

Hello,

If i understand good, you have to do an If condition like:

If(Number <=40, TypeA, If(Number >=41 and Number <=50, TypeB, TypeC).

The If sintax is like If(Conditon, Condiiton true, Else or condition False).

Hope this helps.