Link to Form Field and Linking to Itself?

Viewing 3 reply threads
  • Author
    Posts
  • September 19, 2025 at 12:51 PM #52990

    Shane
    Participant

    Hey all, I have a really weird application of the Link to Form field. Maybe this is more of a rhetorical question because I have a feeling you’re not supposed to use it in this way: in TF5/ TFPro I noticed that in the Link to Form pick list, you can select itself as the child form. I’m curious if this has a specific purpose or it’s just happenstance.

    I am creating a task tracking system to organize all the things I do. Originally I would create a form to handle the tasks, then duplicate that form a few times to contain the levels of subtasks and use the Link to Form field to connect the parent tasks to the child tasks. The problem is the multi-level task system is limited to how many child forms I link with the Link to Form Field. If I was to program this in SQL, I would simply have a field that contained the ID of the parent task then use SQL to find the child tasks and display them with the parent record. I don’t know if there is a way to do something similar in TFPro without creating a chain of child forms.

    I wondered if I could keep all the tasks in the one form, and use the Link to Form to itself so only one form is handling all the tasks. I didn’t think this would work, but surprisingly TFPro creates the “child” task/ record in its own table which looked promising (see screenshot). However when you click the new task in the Link to Form layout object in the record layout, it goes to that record, but doesn’t show the form fields.

    Interestingly, in TF5 it will go to the “child” task fine, but then show the “parent” task in the Link to Form layout object (see screenshot).

    I’m wondering what the intention is when linking a form to itself or if it can be used in a useful way. My guess is you’re not supposed to do it at all. :)

    Thanks in advance and sorry for the long post!

    • This topic was modified 1 month, 2 weeks ago by Shane.
    Attachments:
    You must be logged in to view attached files.
    September 20, 2025 at 8:45 AM #52997

    Shane
    Participant

    I managed to get it to work with the Link to Form Join relationship (see screenshot) although you won’t see any changes update in the table of the multi-table list view until you click to another form and click back.

    Of course this is not ideal in a relational database but I’m probably trying to push the limits on TFPro to see if I can accomplish something in my head. As I mentioned above, I’m trying to create a collection of tasks that are hierarchical with parents and siblings without using multiple forms. This allows endless children records without having to create more forms for each level of children.

    • This reply was modified 1 month, 2 weeks ago by Shane.
    Attachments:
    You must be logged in to view attached files.
    September 22, 2025 at 7:29 PM #53005

    Brendan
    Keymaster

    It should work fine with a One to Many Link to Form field like you had in your first try.

    Are you using the latest Tap Forms Pro update?

    Double-clicking on the row number should take you to the child task.

    This is allowed. It’s so you can create reciprocal relationships. Like a Contacts form that has the people who are related to each other in the same form. The basic information for the Contacts is all the same no matter whether you’re a parent of a child.

    September 24, 2025 at 4:00 PM #53008

    Shane
    Participant

    Thanks Branden, I am using the latest TFP update.

    Of note, in TF5 you cannot link the form to itself properly unless you use the JOIN relationship. TF5 will display its parent as a child if you use ONE TO MANY. JOIN works, but under a JOIN you cannot use a calculation field to pull record data from the parent record in order to cascade data along the children.

    TFPro can use ONE TO MANY and it works properly, but the calculation fields and scripts seem to work intermittently. I’m still trying to figure it out. It could be related to when scripts and calculation fields are executed. I’m assuming they’re executed when the record is viewed? If so then it can be problematic when viewing/ editing child records that depend on data properly being calculated via its parent.

    Another intermittent and BIG PROBLEM with TFPro is when you click a child record in a link to field object, it goes to the child record, but doesn’t show any of the fields (it’s blank) as if there are no fields in the form. You have to add a second child record then click back to the original child for it to work properly. Weird. When I have time I’ll send you a video of it.

    Related to forms linking to themselves, is there a way to use javascript to pull field data from a parent record? I have only been able to do this with a calculation field and have only seen child records in the javascript API. Javascript seems to only grab data from the field of the current record. So I have been trying to use a calculation field to pull the parent field data, and a script to manipulate it but right now.

    • This reply was modified 1 month, 1 week ago by Shane.
    • This reply was modified 1 month, 1 week ago by Shane.
Viewing 3 reply threads

You must be logged in to reply to this topic.