tyFlow Forum
Broken by birth ID - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: Broken by birth ID (/thread-2805.html)



Broken by birth ID - 424454078@qq.com - 12-13-2021

[translated by admin]
I want to select birth ID 1, 2, 3-20, 30, 50, 80-85, 94, 96, 98

This condition is broken, but the attribute test can only test one ID particle. How to add this condition at once?


RE: Broken by birth ID - tyFlow - 12-13-2021

You can use a Script operator, and check them using regular if/else conditions.

Example (snipped):

Code:
var id = tf.GetID(sInx);
if (id == 1 || id == 2 || (id >= 3 && id <= 20) || id == 30 ......etc etc)
{
    //do work
}



RE: Broken by birth ID - 424454078@qq.com - 12-14-2021

(12-13-2021, 06:01 PM)流量 Wrote: 您可以使用 Script 运算符,并使用常规 if/else 条件检查它们。

示例(剪下):

Code:
var id = tf.GetID(sInx);
if (id == 1 || id == 2 || (id >= 3 && id <= 20) || id == 30 ......etc etc)
{
    //do work
}
如果是单数或偶数怎么办