Data Element evalutation Delay | Community
Skip to main content
Level 4
February 10, 2022
New

Data Element evalutation Delay

  • February 10, 2022
  • 4 replies
  • 1362 views

Cross posted from questions section:

 

I'd like more control over how and when data elements are evaluated.

 

Issue:

You have a data element that accesses an object/property: "page.name[0].length"

If that object or property doesn't exist (or you know it will show up later), JS throws undefined errors as soon as the page loads.

 

Idea:

If I could say something like "delay initial execution" in a data element - and in theory what it would do is only evaluate the DE when it's called upon in a rule that would alleviate having to encapsulate most DE's in a try/catch

4 replies

adobechat
Level 5
February 18, 2022

@j2_2 

 

I think you can use 'Rules' to mitigate this risk. So, one approach could be that you can set up a 'Value Comparison' condition in your rule to validate that page.name[0].length" is greater than 0, then you can fire an event to use the data element.

 

Hope this solves your problem.

J2_2Author
Level 4
February 18, 2022

Thanks for the reply - unfortunately no that doesn't address the actual problem - you can't control DE's from within rules like, in the manner the problem specifies, in Adobe Launch

adobechat
Level 5
February 18, 2022

I think you have to solve it by using custom JS code in that case.

J2_2Author
Level 4
February 18, 2022

Yeah I know how to hack it - I want a feature from Adobe that solves for it in a more correct and scalable way, such as a toggle in the UI