Search Results for 'script'
-
Search Results
-
I have a script where several fields are concatenated together including one which contains a number:
function Third_Party_Charges_Csv() { // Fetch content from table var third_party_charges = record.getFieldValue('fld-021cfb3cc4f446ddbf5f9463c7b5d620'); // Define field ids from table columns const item_id = 'fld-410bdf5d624a4651b8a803becd9c6578'; const cost_per_item_id = 'fld-6cea4aa73ad44b6f91ba7f566e321790'; const number_id = 'fld-95791fbc24bd4f3ca714756e5dd6a060'; const cost_id = 'fld-a0be1b009c6a4a99a1784d36da134ee3'; var txt = []; // Loop over all entries and fetch field content. for (var n = 0; n < third_party_charges.length; n++){ var third_party_charge = third_party_charges[n]; var item = third_party_charge.getFieldValue(item_id); var cost_per_item = third_party_charge.getFieldValue(cost_per_item_id); var number = third_party_charge.getFieldValue(number_id); var cost = third_party_charge.getFieldValue(cost_id); // Format field content as desired txt.push((n+1) + ". " + item + ": £" + cost_per_item + " x " + number + " = £" + cost); } // Combine each formatted table row return txt.join(" - "); } Third_Party_Charges_Csv();In the field it displays (as currency) as, eg 32.40, but in the script it shows as 32.4.
Is there a way to make the script show numbers with two decimal places?
Topic: How to call another API
Hi, I am quite new to Tap Forms. I wanted to know, since using JavaScript is an option, if you are able to use fetch (or another JS API) to make an HTTP Request.
I have a client using tap forms 5 and has some renewal_date column. I wanted to automate sending out emails on this renewal date. I wrote a script already to find records that are passed the renewal_date. Now, I have a webhook expecting some record data (email, client_No, renawal_date, …). I would like a way to make an HTTP request to my webhook providing the record data saved in tap form.
Could anyone advice me please as I don’t find a way to do it. Is this even possible in TapForm??
Many thanks!
There is at least one previous post about this topic, to get records not to sort by articles, where writing a script is suggested.
I have a music title database with titles in many languages, so getting the sorting right is important. I’m thinking of setting up two fields, a display title and a sorting title. The records would sort by the sorting title:
Étoile
Jahsager
Man in the High Castle
But the form would only include the display title, and so the sort would appear like this.
L’Étoile
Der Jahsager
The Man in the High Castle
Not like this:
Der Jahsager
L’Étoile
The Man in the High Castle
It’s a lot of work to do this obviously, so I’m checking to make sure there is no other easy solution. Also, I guess this will work?
Muchas gracias,
David