How to dynamically change doc reference based on a row value in a table

A column inside a table is using a FORMAT(…) formula which contains a fixed reference to a doc. Something similar to @EmailTemplate. It’s working correctly.

Is there a way to replace @EmailTemplate with a dynamically built reference, so that either @EmailTemplateCold, @EmailTemplateWarm, @EmailTemplateHot would be referenced by FORMAT(…)?

Maybe based on the value in another column (Phase) in the same table that has values [Cold, Warm, Hot]?

So the idea is the dynamic reference can be built similar to → CONCATENATE(“EmailTemplate”,thisRow.Phase)?

Hello @Parsing_Ideas!
There are different ways to do that but I did it by creating a table with templates by phase so if you were to add a new phase, you can fill the template and it’ll work without the need to change the formula.

I leave the example here

Hi Saul,

Would you mind publicly sharing your doc?

Sorry! it is shared now :sweat_smile:

Thanks for the super fast response! I’ll check it out now.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.