Brendan, thanks for all the work you do.
I’m happy with Tap Forms 5 and don’t want to move to the subscription model of Tap Forms Pro. But I would like to upgrade my iPhone and iPad to iOS 26. Are there are any incompatibilities or loss of functionality with TF5 and iOS26? I’m more concerned with things that might break rather than GUI or display issues, although I want to know about those also.
Hi Rob,
My sincere apologies for taking so long to respond.
Are you using the Join Link Type or the Many to Many Link Type?
With a Join Link Type you can’t link via multiple fields, but you can create a compound field using a Calculation field or a Script field to join two fields’ values together and then join on that field.
You may also want to turn on the Show Inverse Relationship option so you can see the relationship from both sides.
Thanks,
Brendan
Hi Brendan,
I tried this method but I keep getting the error “TypeError: Argument does not match Objective-C Class, line:(null)”.
My document’s form schema is essentially: CLIENTS -> PROJECTS -> TASKS (parent -> child -> child). Essentially I’m trying to copy a TASKS record I have currently selected, to another PROJECTS (parent) record. I’ve selected a record in the Tasks form, and executed the following script where the destination record is another project (parent) record, and the destination field is the PROJECTS -> TASKS Link To field:
`function Copy_Record() {
var destinationRecord = “rec-82855338485542a89c1946c3e2cff83e”;
var tasksField = “fld-c2f532ef6611450abf973d5e7297b475”;
record.addRecordToField(destinationRecord, tasksField);
document.saveAllChanges();
}
Copy_Record();’
Any obvious errors I have done? Thank you!
FYI, I was able to get it to work by removing the shortcuts, duplicate the scripts, and setting the shortcuts again on the duplicated scripts.
I am trying to model marital relationships in TFP. Here is my simplified schema: “People” form with “Name” field, “Marriages” form with “Person1” and “Person2” fields. This works great and People finds all the Marriages records tied to the first field (“Name” to “Person1”). However, Marriages records do not show up in the People form record for Name linked to Person2. Can the Marriages form be linked to the Persons form via two foreign keys (Persons.Person to Marriages.Person1 and Marriages.Person2)? If this relationship is possible, it seems likely a script will be needed to show all Marriage records related to a People record – that would be fine.
That would be great. I may be more pedantic than most, but I feel like there needs to be a way to centralize the UI in TFP, namely being able to display collections of records within other record layouts without having to tediously code something in JS each time.
For a simple example, imagine we have a clients form, and an invoices form. Under a client record layout we want to display all the invoices that are unpaid for that client. While we can easily display the invoices for that client using a Link To field layout object, we cannot organically show invoice records using two criteria such as the current client invoices that are also unpaid without Javascript. You have to create a search for it which requires navigating through the forms pane to see all relevant information in a non-linear way, constantly clicking between searches and forms to view collections of data. It would be nice to have the ability to show any sets of records that are useful for the purpose of that form layout in a centralized way.
One potential idea that comes to mind is to somehow “Link To” a set of pre-created search records elsewhere in the document. However, this is probably harder than it seems depending on the underlying schema of the app.
-
This reply was modified 1 week, 2 days ago by
Shane.
For others interested, what I did is create a “Website” field in each respective forms that contained the URL of that record generated by a script:
function Url() {
var url_id = 'fld-f835751013af4cc7b8fb63aabd0123f1';
var theURL = record.getUrl();
record.setFieldValue(url_id, theURL, true);
}
Url();
This way if I select and display records via a table, I can click on the link to get to the selected record for further editing. My further plan is to augment the script to copy the referring URL into the clipboard and pasting it in a return/ back button in the destination record (via the website field) to go back to the referring record much like how a Link to Form layout object works. I’m not sure if there is something better in the API to do this.
I wish there was a better way to select, display, and edit a set of records in a layout much like a layout Link to Field object. Maybe the table field could be appended to include a link to the selected record(s) which will also breadcrumb back to the referring record much like the Link to Form layout object works.
-
This reply was modified 2 weeks ago by
Shane.
I did logically try that even before seeing it on your website and it didn’t do anything. However like you say, sometimes things are finicky as to when TFP updates so I’ll have another go at it.
Also undocumented is how to spit out values of a sorted pick list array. It was intuitive and I figured it out, but in case anyone’s searching for it:
var sortedList = pickList.sortedValues;
for (var index = 0, count = sortedList.length; index < count; index++){
console.log(sortedList[index].value);
}
document.saveAllChanges();
}
Adding a “.value” at the end of the indexed array will spit out the pick list value in typical javascript fashion.
Thanks for the input, I’ll explore those possibilities.
I saw your website and see that you also see a lot of potential for some commercial applications with Tapforms. Employing this software in a commercial setting could potentially sell a lot of licenses to organizations. I think however, there is some room for improvement with respect to UI design in the layouts to make things more intuitive for a non-technical person. Even if power users can program these layouts for average users it would be beneficial.
TLDR: In my case, I’m creating a productivity/ business organizer in Tapforms because I just couldn’t get anything else to work the way I wanted them to. To this, I want to be able to hand over the synchronized documents to my wife so she can help me with the business admin. She has to be able to intuitively navigate around the forms/ scripts to get things done.
-
This reply was modified 2 weeks, 1 day ago by
Shane.
You can add the script button {...} in the toolbar that displays all your favorited scripts. That’s what I do.
I like to use my keyboard shortcuts and use my QuickLaunch script extensively (https://lab.danielleu.com/tapformspro/script-library/index.html?p=Quick-Launch). It provides a pop-up that allows you to select the document script you want to run.
Another option is using a weblink field and linking this to the script url using the tfpro://... url scheme. You can get the script link in the script editor.
Attachments:
You must be
logged in to view attached files.
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks
Hey all, sorry to post so much but I’ve been spending a lot of time trying to explore the power of the Javascript API and I keep running into roadblocks while trying to create features for my project manager in Tapforms Pro. I just want to check my understanding of some of the JS functions.
I know you can add values to a pick list by using the addValue method on a pick list object. I discovered that this will permanently add values to the pick list. I thought it would be cool idea to be able to dynamically create a pick list for a text field based on what’s happening in the form, but the addValue method is permanent. It would be cool to have a deleteValue which would allow for dynamically generated pick lists for a form/ document.
Thanks.
I love the default layout as it’s quick, easy, and super clean. It’s very difficult to come up with something that clean looking by creating my own layout.
The only disadvantage of the default layout is you can’t place script buttons on it (that I know of). It would be really useful to do have this functionality. Either something like a “button field” or a setting in the Script Field to control if the script field will execute the included script automatically or by button trigger in the default layout field. Some simple UI examples have been attached.
Attachments:
You must be
logged in to view attached files.
Hi John,
Please try following. Without having access to your document, I can’t verify the script, but hopefully, it works.
function updateProperty(){
// ————————————–
// Parent form field IDs (Property)
// ————————————–
const PROP_PROPID = ‘fld-6716b8eda66d44339f6ba08f37334ea8’;
const PROP_LASTNAME = ‘fld-89a63a63d13048e6847d747cc9a2f5df’;
const LINK_TO_PROPERTY = ‘fld-e476bcbca1a9425ebe799373abc1ab73’; // inverse relationship link
// ————————————–
// Child form field IDs (Payment)
// ————————————–
const PMT_PROP = ‘fld-2a06b08909054396ae904b3fb2f4d04c’;
const PMT_PAYEE = ‘fld-f050a0f16e1b41b8bf62ed96e567032f’;
// ————————————–
// Get the linked Property record
// ————————————–
var parentRecord = record.getFieldValue(LINK_TO_PROPERTY);
if (parentRecord == null || parentRecord.length == 0 ) {
// No linked property; exit safely
console.log('No linked property', "#ff0000");
return;
}
// parent record is an array, extract first element
if (parentRecord.length = 1) {
parentRecord = parentRecord[0];
} else {
console.log('Multiple linked properties', "#ff0000");
return;
}
// ————————————–
// Read values from the Property record
// ————————————–
var propId = parentRecord.getFieldValue(PROP_PROPID);
var lastName = parentRecord.getFieldValue(PROP_LASTNAME);
// ————————————–
// Write values to the Payment fields
// ————————————–
record.setFieldValue(PMT_PROP, propId);
record.setFieldValue(PMT_PAYEE, lastName);
document.saveAllChanges();
return;
}
updateProperty();
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricks
So if you have the same join field in two child forms and the one in the main parent form, then you can simply add a couple Join link to form fields to your form and Tap Forms should handle joining them at the same time as long as all 3 field values match.
Or do you mean compound join fields? If so you can simulate that with a Calculation or Script Field.
-
This reply was modified 2 weeks, 4 days ago by
Brendan.
I am still lost on scripts on parent child relationships. I am trying to populate two fields
on the payment(child)form with values from property (parent form).
I don’t understand _ is the paarent record already in memory or di I need to
do. read dto retrieve the data. Am I supposed to pass the variable names as varname of ‘varname’?
I even tried ChatGPT to generate the following script andit errors out
// ————————————–
// Parent form field IDs (Property)
// ————————————–
const PROP_PROPID = ‘fld-6716b8eda66d44339f6ba08f37334ea8’;
const PROP_LASTNAME = ‘fld-89a63a63d13048e6847d747cc9a2f5df’;
const LINK_TO_PROPERTY = ‘fld-e476bcbca1a9425ebe799373abc1ab73’; // inverse relationship link
// ————————————–
// Child form field IDs (Payment)
// ————————————–
const PMT_PROP = ‘fld-2a06b08909054396ae904b3fb2f4d04c’;
const PMT_PAYEE = ‘fld-f050a0f16e1b41b8bf62ed96e567032f’;
// ————————————–
// Get the linked Property record
// ————————————–
var parentRecord = record.getFieldValue(LINK_TO_PROPERTY);
if (parentRecord == null) {
// No linked property; exit safely
return;
}
// ————————————–
// Read values from the Property record
// ————————————–
var propId = parentRecord.getFieldValue(PROP_PROPID);
var lastName = parentRecord.getFieldValue(PROP_LASTNAME);
// ————————————–
// Write values to the Payment fields
// ————————————–
record.setFieldValue(PMT_PROP, propId);
record.setFieldValue(PMT_PAYEE, lastName);
Can you make it clear to a dinosaur Cobol programmer?
Are there any example forms that illustrate a working link between records
and use scripts to manipjulate data?
Thanks for any help you can give