Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Data element not setting latest value

koolswap
Level 2
Level 2

Hi all,

 

Need your help for an issue I am facing with data element not setting the latest value passed from the application, when used in multiple rules and those multiple rule firing at the same time. 

 

It seems a timing issue, but I have set the "Storage duration" to None.

 

The data element is returning the older value. It should send us the latest updated value.

Adobe Launch Adobe launch tag Export
3 Replies
evolytics_brian
Community Advisor
Community Advisor

@koolswap - Are you triggering direct call rules, by chance? If so, maybe consider passing the data in as part of the event payload. That way, when you execute the rule, you're looking at the exact data you need and not having to wait for other logic to execute.

For example, let's say you have a direct call rule that you call "do-that-thing" and you want to pass in a color specific to each time it is called. To make this work, you'd make the following call:

_satellite.track("do-that-thing", { color: "blue" });

The second parameter of the .track() call must be an object, and you can pass in whatever properties you need. The entire payload/object will be accessible inside the direct call rule as "event.detail". Any properties (eg// color) can be accessed by their names, for example:  %event.detail.color%

This approach can be used to populate variables (props/eVars/etc), inform conditional logic, etc, and the value is specific to each time the direct call rule is invoked.

yuhuisg
Community Advisor
Community Advisor

There could be a race condition in your Rule vs the data element getting updated.

E.g.:

  1. User performs the action that triggers the Rule.
  2. The Rule runs.
  3. The Rule gets the values from the data elements.
  4. The web page code runs to update the data elements.
  5. The Rule's action runs.

In the above scenario, the data elements got updated only after the Rule had executed at step 3. As a result, the Rule only knows of the old data element values, not the new ones that were set at step 4.

jantzen_belliston-Adobe
Community Manager
Community Manager
Do any of the answers below answer your initial question? If so, can you select one of them as the correct answer? If none of the answers already provided answer your question, can you provide additional information to better help the community solve your question?