Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Script Talk › constants / phrases datebase wide
- This topic has 5 replies, 3 voices, and was last updated 5 years, 1 month ago by Brendan.
-
AuthorPosts
-
November 3, 2019 at 4:20 PM #37728
EddyParticipantHi Folks!
Actually I am falling in love with this app… In the meantime, we are starting to create even our CRM with it.
Doing this, I have a task/problem:
Some text phrases and numbers of us will I have to change time by time. For example the footer of our emails. Of course, I do not want to rewrite all the scipt and calculation fields than. Therefore, I do not want to write our footer (signatures) text in the script and calculation fields directly…
But how (where) can I store text phrases, so that they will be replaced everywhere I used them in scipt and calculation field, if I change them?
Sorry for my poor English and thanks in advance.
Eddy
November 3, 2019 at 9:33 PM #37735
Sam MoffattParticipantI’d probably use the
runScriptNamed
functionality and then define the common values in a form script. You then load the form script anywhere you need to use them and it’s a single place to change. That could be populated into a field that you can refer to from a calculation field or obviously it’d work natively in a script field.November 4, 2019 at 1:10 AM #37738
EddyParticipantHi Sam!
Thanks for your answer.
Actually, I found a similar workaround. I can put the constant into a field by using the default value. Then, if my constant is changing, I only have to change the default value in one field.
And if I use this in a form/table, which is basic ( meaning connected to all other forms/tables), I can refer to that field from everywhere.
But nice and clean is different …
So, any other ideas?
Regards, Eddy
November 4, 2019 at 3:04 AM #37741
BrendanKeymasterWell, if you are creating a custom layout for your emails, you can add a static Text object to your layout and then type in whatever text you want to appear there. Such as your company address, email, phone number, etc. That text will appear on your custom layout for every record when you print/email your records.
That’s another idea.
But also Sam’s idea of having a single Form script to store a bunch of information like that which you can pull up from field scripts is a great idea too.
November 4, 2019 at 3:11 AM #37743
EddyParticipantThanks for your idea, Brendan!
But what we need is a phrase, that we can use in scripts and fields.
Did you thought about equipping tapforms with the ability to have constants? – Somehow, we already have something like that. The picklists. So, that preferences window would be the perfect place, to store phrases to be used tapforms wide.
Regards, Eddy
November 4, 2019 at 7:10 PM #37765
BrendanKeymasterWell in the next update of Tap Forms I’ve added the ability for you to get access to the Pick Lists, so you could use them that way if you like from a script.
-
AuthorPosts
You must be logged in to reply to this topic.