Search Results for 'script'
-
Search Results
-
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
Topic: Can not Change Scriptname
Hi everyone,
i do not Know what I have done, but I can not change the script names anymore in one of my databases.
I can create new Scripts, delete them and even edit it, but the field, to change the Name is not aktive anymore and so I can not change the Names (New script i.E.)
Anyone any Idea why I have done?
Steve
When I click a link field to jump to the parent record, the split position between the record list and the record detail view, or between the form list, does not change to the position set in the destination form.
Also, the script menu does not change to that of the target form.
(the Form Inspector does change to the destination form)I have a complete script to look up a reference form and return a result but if I input a value that I know is there – Brat. it gives me the error
Intergeneric Reference: SyntaxError: Unexpected identifier ‘found’. Expected ‘)’ to end an argument list., line:1If If just input Brat without the “.” It gives me this:
Intergeneric Reference: ReferenceError: Can’t find variable: Brat, line:(null)This is a test script that gives the same result:
function lookupIntergeneric() {
var refForm = document.getFormNamed(‘Intergeneric Reference’);
return refForm ? ‘Form found’ : ‘Form not found’;
}
lookupIntergeneric();Topic: Global function
Hi, everyone and happy easter,
Using piclists, you can set them to to Document, so that you can access them from every form. is there somehow a possibility to make the same with functions?
i have several function, which I need to use in several forms. actually I copy them to each script I need it in. Is there some way to declare it onetime and use from every script?
Greetings 🐣
Steve