Search Results for 'script'
-
Search Results
-
Topic: User-Agent header
Hi,
I’m trying to connect to the Discogs API, and my AI scripting buddy tells me “The failure likely occurred because the Discogs API strictly requires a User-Agent header, which Tap Forms Pro cannot currently send through its built-in Utils methods”.
Any suggestions to help on this?
reference: https://www.discogs.com/developers
Your application must provide a User-Agent string that identifies itself – preferably something that follows RFC 1945.Hi Everyone,
I may have found a problem with Script Fields and number formatting in Tap Forms Pro.
I have a Script Field in a form that returns a numeric value from JavaScript.
I tested different variants, for example:– returning a parsed integer directly
– returning a rounded number
– returning a plain numeric value without formattingExample idea:
return 12050;
The field settings are:
– Number Format: Currency Accounting
– Currency: Czech Koruna
– Decimal Places: 2My expectation was that Tap Forms would display the returned numeric value using the field’s configured formatting, for example with the correct currency/accounting display.
But the formatting does not seem to be applied as expected.
It looks like the Script Field output is shown more like a raw value than like a properly formatted currency field.I also tried simplifying the script as much as possible, so this does not seem to be caused by custom formatting logic inside the script itself.
Question:
Is this expected behavior for Script Fields?
Or should a Script Field that returns a numeric value inherit and display the configured number/currency formatting of the field?If needed, I can provide a minimal reproduction example.
Thanks!
Steve
I created a “parts” database in TFP on Mac. Nominally it contains a part number, description, and an image of the part. Most of the images have been sourced by screen shoting something on the web and pasting it into the picture field. This works fine, and although I’ve made zero effort to worry about size or dimensions of these images, they seen to scale perfectly to the image area in my layout, either by matching the width or the height. Unfortunately, when I”ve created layouts in the iOS app, these images are way too large to be viewed. I can touch them, and see the whole image in the viewer, but not in the layout image box by itself. Is there a way I can get TFP for iOS to automatically scale these images like it (apparently) does on Mac? I would like to simply select a record and see the part, no matter how small it might appear, without having to touch the image to bring up the viewer.
Thanks,
Gary (new user)
I solved a Tap Forms limitation by using a generated technical code to separate linked records by status, even though I could not apply an extra filter directly inside the relationship.
Example:
A Unit / Apartment should showactive Lease Agreements
archived Lease Agreements
separately.Idea
Each Lease Agreement gets a calculated field called something like Display Code.That code consists of:
a status prefix
plus the RecID of the linked unit
For example:A.rec-123… = active agreement
N.rec-123… = inactive / ended agreement
Step 1: Expose the unit’s own RecID
In the Unit form, create a script field that returns the record’s own ID:function UnitRecID() {
return record.getId();
}
UnitRecID();
Step 2: Read the linked unit RecID inside the lease agreement
In the Lease Agreement form, create a script field that reads the RecID from the directly linked unit:function LinkedUnitRecID() {
var unit;unit = record.getFieldValue(‘UNIT_FIELD_ID’);
if (!unit || !unit.length) {
return ”;
}return unit[0].getId();
}
LinkedUnitRecID();
Step 3: Build a calculated display code
In the Lease Agreement form, create a calculated field such as:IFEMPTY( Lease End Date ; “A.” ; IF( Lease End Date < TODAY() ; “N.” ; “A.” ) ) + Linked Unit RecID
Result:A.rec-123…
N.rec-123…
Step 4: Use separate linked views in the unit
Now the Unit form can have separate linked fields / subform views for:active lease agreements
archived lease agreements
Important note
Do not create new lease agreements through the filtered view.Instead, create them through a normal unfiltered subform like:
All Lease Agreements
That way the direct relationship to the unit is set first, and the technical fields can calculate correctly afterward.This approach worked well for me when I needed different “views” of the same linked records, but Tap Forms could not apply the additional filtering logic directly inside the relationship.
Perhaps someone need this too.
C ya
Steve