Search Results for 'script'
-
Search Results
-
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
Topic: TPF Pro ebay API access
I’ve attempted to write an ebay posting interface to my Tap Forms Pro DB for posting items for sale off and on. I know just enough javascript to get myself in trouble. AI is sometimes a hinderence rather than a help. But it’s telling me the following. It’s recommending running a local js file because tap forms can’t access the ebay api directly?? Is it correct?
My question to claude:
can the tap forms pro script just access the ebay api directly?No — the blocker is that eBay’s API requires an Authorization: Bearer <token> header on every request, and Tap Forms Pro’s HTTP methods can only set Content-Type. There’s no way to pass custom headers:
// These are ALL the HTTP calls Tap Forms can make:
Utils.getJsonFromUrl(url)
Utils.getTextFromUrl(url)
Utils.postJsonToUrl(json, url)
Utils.postContentToUrlWithContentType(content, url, contentType) // ← only Content-Type, nothing elseeBay also requires the OAuth token refresh call to use Authorization: Basic base64(clientId:clientSecret) — also a custom header.
The local server exists purely to add those headers. It’s a thin shim:
Tap Forms → POST http://localhost:3721/post-to-ebay (no auth needed, local only)
server.js → POST https://api.ebay.com/… (adds Authorization: Bearer <token>)If Tap Forms ever adds a Utils.postWithHeaders(url, headers, body) method, you could go direct. Until then, the proxy is the only path.
In case anyone uses Python and wants to improve the TFP workflow. Here’s an example of how to call TFP and get results/data back using a JSON object.
- This topic was modified 5 months, 3 weeks ago by .
- This topic was modified 5 months, 3 weeks ago by .
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks