条件分岐のご質問です

どなたか教えていただけますと幸いです。

条件分岐にて、
「代入した変数の中身が何もなかったら(null)であれば」
というのを作成したいです。
条件分岐以外でもなにか方法があれば教えていただきたいです。

どのような式がありますでしょうか。

よろしくお願いいたします。

Hi @n.prettytake

You can use this syntax in assign activity

result = If(yourVariable is Nothing, defaultValue, yourVariable)

If: This is the UiPath function that works similar to the conditional (ternary) operator in other languages.

yourVariable is Nothing: This is a condition checking if yourVariable is Nothing, which is UiPath’s equivalent to null or having no value.

defaultValue: If the condition is true (i.e., yourVariable is Nothing), this value is assigned to result.

yourVariable: If the condition is false (i.e., yourVariable has a value), the value of yourVariable is assigned to result.

result variable Datatype can be declared according to yourVariable datatype. If yourVariable datatype is Integer then result variable Datatype will also be integer and defaultValue will be also integer.

Regards

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.