Skip to main content
dinesha5713
November 15, 2024
Solved

typeof() vs runtimetypeof()

  • November 15, 2024
  • 5 replies
  • 0 views

Even i gone through the documentation i cant get the exact difference plz can anyone explain in easy and simple words 

Best answer by somasundaram.d

There are some data types in appian like "User or Group", "Document or Folder" etc., You will not know exactly what value the variable has during process execution. It can be user or it can be a group, ex: it can hold "testUser" or "[Group:51]". 

We cannot find it out using typeof(), as it will return as "User or Group". So to specifically know what value the variable is holding during runtime we use runtimetypeof().

5 replies

somasundaram.d
November 15, 2024

There are some data types in appian like "User or Group", "Document or Folder" etc., You will not know exactly what value the variable has during process execution. It can be user or it can be a group, ex: it can hold "testUser" or "[Group:51]". 

We cannot find it out using typeof(), as it will return as "User or Group". So to specifically know what value the variable is holding during runtime we use runtimetypeof().

stefanhelzle0001
Brainy
November 15, 2024
karumurua531442
November 16, 2024

typeOf(): 

  • It can retrieve the type of an expression during design time.
  • what the designer expects the data to be based on the configured type.
  • you can use this to validate or debug the expected type of an expression

runtimetypeof():

  • it can retrieve the type of an expression during runtime of the that expression.
  • it says what the data is at runtime.
  • You can dynamically validate the type at runtime and handle unexpected data
November 17, 2024

typeof():

  • Tells you the expected type of a value during design time.
  • If you want to check if a variable should be a "User" or "Group", typeof() will tell you it is "User or Group", but not the exact value.

runtimetypeof():

  • Tells you the actual type of a value during runtime.
  • It shows the exact type at that moment, so you know if the value is a "User" (e.g., "test user") or a "Group" (e.g., "[Group:10]").

Please find the link for more details https://docs.appian.com/suite/help/24.3/fnc_informational_runtimetypeof.html#use-with-rule-inputs

December 5, 2024

Thanks for the link.