Skip to main content
Diego_Lineros2
Level 5
Jul 22, 2024 8:53 PM UTC
Solved

Custom object field token based on edge object

Hello,

 

I have a Many to Many setup, this is not the real case but imagine I have my CO bridge as email and Course. Then I have an edge CO with Course and availability.

Email |<--> | Email -- Course |<--> |Course --Availability|

 

I want to send an email to people who has course availability = yes , which is not a problem from the smart list perspective, but I want to say in the email which course. The problem is that the Edge CO is not available in the scripting to apply the logic, is this possible somehow or a very long shot ?

 

Dear email

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Jul 23, 2024 9:16 PM UTC

Set up a static {{my.token}} like so:

#set( $edges = [ { "edgeField1" : "value", "edgeField2" : "value" }, { "edgeField1" : "value", "edgeField2" : "value" } ] )

 

Then you can read the junction objects at runtime and look up in the array of edge objects to get the edge props.

3 replies

SanfordWhiteman
User Group Leader
User Group Leader
Jul 22, 2024 10:13 PM UTC

Sorry, no. You can’t access the edge object. What we sometimes do is inject the edge objects (if there aren’t too many of them) as JSON in {{my.tokens}} and then read from there.

Translate
Diego_Lineros2
Level 5
Jul 23, 2024 6:11 PM UTC

Interesting, I actually don't have many. Do you have more information about injecting the edge objects as JSON?

Translate
SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Jul 23, 2024 9:16 PM UTC

Set up a static {{my.token}} like so:

#set( $edges = [ { "edgeField1" : "value", "edgeField2" : "value" }, { "edgeField1" : "value", "edgeField2" : "value" } ] )

 

Then you can read the junction objects at runtime and look up in the array of edge objects to get the edge props.

Translate