Forum Discussion

RaptureLazarus's avatar
5 years ago
Solved

How to get a property default value?

Hi everyone,

This feels like a silly thing to ask, but I haven't seen anything in the documentation or the forum regarding getting the default value of a property.

Some context:

I need to evaluate values, but if a value is not present, I need to evaluate using a default value.

The problem is that, when I use getProperty, no value is provided.

I can use an onPopulate event to add the default value to the property, but that defeats the purpose of having the option to do it from the ItemType itself.

Am I missing something here?

Thanks in advance..

  • Maybe some magic trick like this one helps?

    --> getProperty("item_number","thisIsMyDefaultValueWhenNoOtherValueProvided");

1 Reply

  • Maybe some magic trick like this one helps?

    --> getProperty("item_number","thisIsMyDefaultValueWhenNoOtherValueProvided");