Program variable?

Hello everyone,

I’ve somes questions about program variable :

Why to make the program rules, are we obliged to create variables?

Why is it not possible to use data elements and attributes directly without using variables in the program rules?

Why are variable names used instead of Uids in the program rules?

Best Regards

1 Like

Hi @didate

EDITED: Good questions, I will if I can get further insight from the @tracker-analytics team. I deleted the first part of my response to not confuse others, apologies I got confused with some things. Thanks!

When creating a program rule variable, you are giving it a name so it’s easier to select it when creating the program rule.

I hope this helps! I love the ‘why’ questions :slight_smile:

Hi Gassim, can you clarify your comment that it’s possible to use data elements directly in the program rule? I do believe, even after now reading through the documentation, that data elements can’t be added directly into the program rule (rather, it has to be set to a program rule variable, which is used directly in the program rule).

1 Like

@lnunez Thank you for the correction! I edited my post above. Thanks!

1 Like

My pleasure! @didate My opinion is that program rule variables are required in place of data elements to allow the option of selecting which value you want. For example, in this screenshot, there are multiple values you can choose from, even from one data element (e.g., the value for this data element from the previous event vs the current event). There might be other reasons though.

1 Like

@Gassim , @lnunez Thank you for your answers.

I don’t know if it’s a good reason, because as you know, with the program indicators we use the data elements directly, and in my opinion there is no difficulty.

My proposal is that if we can’t do without program variables, it’s to use their Uid instead of the name. Because currently if you change the name of the variable, you are forced to modify all the program rules that refer to this variable.

hum, I understand what you’re saying, I also think it’s a good reason to have the PV.

Thanks

1 Like