Search Results for 'script'
-
Search Results
-
Hi,
being someone who doesn’t know Java Script, I have been trying to copy three fields and place them into a fourth field, which is a different field to where the script will reside. As it is Street, Suburb and State that I want copied I also need spaces between the three fields, so when pasted into the “Map location Address” it will return the google map location of the address. I’ve attached the relevant part of the form to hopefully make it clear what I am trying to do. I couldn’t find my question in the forum, so if it has has been covered previously, I apologies in advance.
Cheers
Trusty
Hi,
I’m setting a star rating when I add a new record using a script.
When I do this the field value shows the correct number of stars in Tapforms – however if I create a search and query on, eg rating is 4, then the programmatically set four star records do not appear.
Any records entered manually do appear and if I change the rating of my scripted 4 stars, to another rating then change them back to four, they do filter correctly.
It just seems when they are set programmatically they don’t filter correctly.
I am using record.setFieldValue() to set the rating.
Can anyone tell me how I should be setting the rating so that the query works?
Thanks
Martin
I have defined a form script that is called via ‘runScriptNamed()’ twice from different field scripts. This is basically working. An example: I have a form for all persons (authors, translators, actors, …). Within this form, I have fields for the date of birth and death. As sometimes only the year is known, in both cases I have defined separate fields for day / month / year. As for the month, there is a picklist with options ‘january, february, …). Now there is a script field which stores the person‘s name along with the dates of birth and death, for example ‘Wells, H. G. (21.09.1866 – 13.08.1946)’. To get this, a form script converts the month (september) to a numeric like text (09). This is done for birth and death.
Now the problem: It seems there is no way to call the form script (‘runScriptNamed’) with parameters?
I found a solution by using global variables, which works, but perhaps there is another (perhaps better) solution?Thanks for any ideas or hints!
KonradHi
I’m programmatically creating fields using:
form.addNewFieldNamedWithType(key,fieldType)
The documentation for that function in the scripting API gives the following field types:
[text, number, calc, location, photo]
I’d like to add a boolean / checkmark / yes-no field.
Is this possible using a script?
Tom