Create a standard function without a Table

#1

Hello everybody,
One of my colleague sends a lot of need identical emails and I think there’s an opportunity to create an email template generator:


You have a picker to configure the email main variables and a button which emulates a mailto :OpenWindow(Concatenate("mailto:",[Picker - Contacts],"?subject=",EncodeForUrl([Mails - Templates].filter(Name= [Picker - Mail content]).Subject),"&body=",Concatenate("Hello ", [All contacts].filter(Email=[Picker - Contacts]).[Full Name],",","%0D%0A",[Mails - Templates].filter([Picker - Mail content]=Name).[Formated content]),"%0D%0A",User().Name))

I’d like to create some kind of “local” variable like {{contact}} that would allow me to dynamically replace it by the name of the contact listed somewhere else inside the template body or subject. This would allow my colleague to write the email templates by herself.

Is it possible to create a function like :
myTransformation(TEXT, {{set of rules}}), that applies {{set of rules}} to TEXT
So I don’t have to copy/paste {{set of rules}} everywhere when I update them?

I could create a table with a 1st column “input” and a second column “output” with a formula that would apply {{set of rules}} to “input” but that doesn’t sound like a best practice.

I hope this question wasn’t already asked/solved somewhere else.

Cheers,

0 Likes

#2

I asked and coda hq said to do what you said is not best practice. User Text Box Input

Maybe if more people vote up these posts they will make dedicated text boxes for entry

0 Likes