Hi,
I'm having this issue in which I want to retrieve the link URL from a webinar depending on their eventid (being the eventid a dedupe field.
My code is this one:
#set($targetEventId = "93992165641")
#set($index = -1)
#foreach($webinar in $zoomWebinars_cList)
#if($webinar.eventid == $targetEventId)
#set($index = $foreach.count - 1)
#break
#end
#end
#if($index != -1)
<a href="${zoomWebinars_cList.get($index).joinURL}">Access Webinar</a>
#else
Webinar not found.
#end
Thing is I want to include 3 velocity token in 1 single email. The 3 tokens will appear as hyperlinks but will only redirect to 1 session.
I know there are some resources for #foreach thing but my coding skills are not good enought I believe.
Does anyone know what's causing the problem here?
I did some testing and index works fine as it retrieves the correct eventid and URL but won't populate it correctly in the hyperlink.
Hi @SanfordWhiteman ,
I have one object whose values are webinar sessions.
I want to output the matching joinURL to the eventID it belongs to.
Example:
I want to be able to send 1 email that has in it 3 CTAs for the 3 webinars.
So in that email I'd like the link fo the CTA to be a Velocity Script token.
Since joinURLs are dynamic depending on the user, I have to exactly retreve the joinURL from the object.
Say I have a table:
Webinar 1 | Date 1 | Access Webinar |
Webinar 2 | Date 2 | Access Webinar |
Webinar 3 | Date 3 | Access Webinar |
The "Access Webinar" would be the Velocity Script token with the joinURL specific of the lead who's opening the email (and that has the Velocity code I put at the start of the thread).
So the issue is, I have 3 webinars with a unique event ID:
Webinar 1's eventID is 1111
Webinar 2's eventID is 2222
Webinar 3's eventID is 3333
I will change the eventID on each Velocity token in the targetEventId and in the end, it will only show 1 joinURL for only 1 event ID.
#set($targetEventId = "93992165641")
End result is:
Webinar 1 has joinURL matching eventID 1111 (good)
Webinar 2 has joinURL matching eventID 1111 (wrong, they should've had joinURL matching eventID 2222)
Webinar 3 has joinURL matching eventID 1111 (wrong, they should've had joinURL matching eventID 3333)
Hope this helps to clarify the issue, let me know if I need to explain further.
Thanks!