How to get a Join of a collection field in markdown

I have a database ‘Campagne activiteit’ with a one to many relation to ‘Geklikt op URL’


The goal is to put the Geklikt op URL.Name in a rich text field.

I’m currently doing that via a hack (the SYSTEM formula creates a join) but want to avoid formulas when not needed.

The markdown guide says:

So I’ve tried several things, this was the last one

{!Campagne activiteit:Geklikt op URL,Name!} 
<%= Campagne activiteit.Geklikt op => url.Name).join(` | `) %>

I’ve also tried CampagneActiviteits and GekliktOpUrls (that are the field names in GraphQL) but that also didn’t worked.

Does somebody knows how to fix this?

Thanks in advance!

@YvetteLans do you still need help on this?
I can’t tell from the post whether the automation is running in the Campagne activiteit db or somewhere else.
If the former, then perhaps the answer is as follows:

{!Geklikt op URL:Name!} 
<%= Entity.Geklikt op => url.Name).join(` | `) %>

Thanks for the reply! No not yet. It’s working because of the join formula that I’ve put in between but would be great if I can skip that formula.

The automation runs in the ‘archive’ database. If an entity is linked to the archive, then the prepend to description runs.

Because it’s a different database, this set-up gives an error.

Also tried:

{!Campagne activiteit.Geklikt op URL:Name!} 
<%= Entity.Geklikt op => url.Name).join(` | `) %>

But that’s also not working.

So really curious how we can get the ‘Campagne activiteit’ entity :smile:

Thanks again for you endless help!

So if I got it right, you’re trying to use markdown to get info (Url) from a collection of Geklikt op URL entities, linked to a Campagne activiteit entity inside an automation running on an Archief entity (which can be linked to many Campagne activiteit entities).
I don’t think it is possible I’m afraid.
Markdown allows you to dynamically insert the values of simple fields of the triggering entity, as well as the values of fields in linked entities, but it seems in this case you are trying to get the values of fields in entities linked to entities linked to the triggering entity.
The only way is with an intermediate formula field, which it sounds like you have done.

Thanks for looking into it. Then I will leave the formula as it is :smile:

To automatically embed clickable links to Geklikt op URL within Campagne activiteit rich text fields, consider a script that generates and inserts Fibery link formats /[/[#^${databaseId}/${}/]/] directly. Trigger this script on entity updates/creations for seamless integration. This approach bypasses the need for manual linking or formulas, simplifying your workflow.
Hope this helps streamline your process!

1 Like

Thanks! But the entity will be deleted after the archive automation is done. So a URL to the entity won’t work (the URL I mentioned is the URL that’s part of an email campaign). A script is possible but for now it works with the little formula in between :smile: