Tap Forms – Organizer Database App for Mac, iPhone, and iPad › Forums › Using Tap Forms › LINK-TO-FORM TP 5
Tagged: link to form
- This topic has 5 replies, 4 voices, and was last updated 7 years, 4 months ago by scneophyte.
-
AuthorPosts
-
August 14, 2017 at 8:50 PM #24009
Alexander LinParticipantI have just recreated one forms, that originally built on TP 4.0.7, on TP 5.1.2.
I set up a LINK TO FROMS of Form-A to itself with One-to-Many Link Type. And also a LINK TO FROMS of Form-A to Form-B with One-to-Many Link Type.
I found there are some different behaviors in between of TP4 and TP5.
1. For TP5, duplicating an existed record of Form-A, new record data does not duplicate the data of Link-to-Form field that point to Form-B records. For TP4 version, it did.
2. Form-A’s Link-to-Form field of Record-1 to From-A another record Record-2, but both of the data in Link-to-From field and Link-from-Form field of Record-1 point to Record-2, suppose it should be only Record-1’s Link-to-From field point to Record-2.Please advise,
Thanks,
August 14, 2017 at 11:48 PM #24011
BrendanKeymasterIf you setup a Link to Form field to itself, you should not enable the Show Inverse Relationship option on your Link to Form field. It won’t work right in Tap Forms 5. The Link to Form field will automatically show the inverse relationship when you look at the child record. Not sure if that may be what you’ve setup.
1. I understand this is an issue. I have to look into it.
2. Turn off the Show Inverse Relationship on the Link to Form field to see if that looks any better.
August 18, 2017 at 6:01 PM #24062
Alexander LinParticipantThanks for your response to this question raised.
For the second item, I set up a test form on TP 5 based on your explanation to remain the Invert Relationship option disabled, I realized the LINK-TO-FORM design concept on Tap Forms 5 have a little bit change. But I am still trying to figure out a way to fulfill my previous forms design in Tap Forms 4.
Actually I have modeled some forms that with recursive type data structure on my TP 4. For example, a form for matrix organization of company or a form for genealogy, that setup with a pair of Link-to-form and Link-from-form to trace upward and backward of organizational body. If Link-from-form field could not be used in the case of Form link to itself. From my current understanding, the relations to upward layer and relations to downward layer will be mixed in on Link-from-form field,
Layer 1: Orz-A
Layer 2: Orz-B
Layer 3: Orz-COrz-A’s Link-to-Form field : Orz-B
Orz-B’s Link-to-Form field : Orz-COrz-C’s Link-from-Form field : Orz-B
But
Orz-B’s Link-from-Form field : Orz-A and Orz-CUpper layer Orz-A and Lower layer Orz-C mixed in one Link-from-Form.
I think current LINK-TO-FORM design used for link to itself in Tap Forms 5 is quite useful for implementing peer-to-peer layer relationships, but as for the upper-lower hierarchical layer relationships, is there any idea to setup a form for this kind of application?
Thanks.
August 19, 2017 at 9:46 AM #24066
BrendanKeymasterIt was more complicated to setup the Link to Form and Link From Form system in Tap Forms 5 because of the switch to Couchbase Lite where I don’t have direct access to the SQLite database engine. It all goes through a layer now and uses “NoSQL” commands to work with the data.
So with that, yes, your observations are correct in that the inverse related records will appear in the same Link to Form field.
I was hoping to revisit that when Couchbase Lite 2.0 came out, but the way they’re developing it, they’re making it difficult for me to migrate to the new version. They’ve basically removed sync support for Cloudant and Apache CouchDB, so that complicates it for me. But that’s another discussion.
When you say “upper-lower” hierarchical layer, do you mean that you want A -> C instead of A -> B -> C?
The Link to Form field was designed to only show one level deep. To go deeper you have to navigate into the child records.
August 19, 2017 at 9:14 PM #24078
Mike SchwartzParticipantAlexander,
You can set up a form and reflect an organizational hierarchy by using an auxiliary form to avoid the problems you’re encountering. I worked up a little example with a form named Departments and a linked form named Organization. Each form will have the same number of records, one for each department. Here’s what I did:
1. Create a form named Departments. This will be the master database of all the departments, including all relevant info for each department, including relationships to other departments.
2. Start out by creating a single field in Departments, called Dept. Name.
3. Create ten records in the Department form with the following department names: A, AA, AB, ABA, ABB, ABBA, AC, AD, ADA, ADB. I chose those names so that you can immediately see the hierarchy. For example, Department AB has Parent A, sister AA, and children ABA and ABB.
4. Next, create a pick list named “Department Names” with the options to use values from form Departments, field Dept. Name.
5. Now create your auxiliary form, named Organization, with a single field named Department that uses the Department Names pick list. Create 10 records to match the 10 records from the Departments form. Just work your way through the pick list for each new record. (This will be faster than exporting to CSV and importing into the Organization form.)
6. Now you’re ready to add the links on your Departments form. Add a Link to Form field named Parent Dept., many-to-many, linking to form “Organization”, Show Inverse Relationships. Create two more fields named Sister Dept. and Child Dept, with the same parameters.
7. Define all the links for each record in the Departments form. For Department A, link the four Child departments AA, AB, AC, and AD. For the next record AA, link to the Parent A and sister AB. For record AB, link to Parent A, sister AA, and children ABA and ABB. And so on.
8. Clean up the auxiliary Organization form. This form will now contain the original Department text field that you created and populated, plus the three Link from Form fields that were created automatically. All three of these fields will start out with the same field name, “Departments”, referring to the parent Form. Click on one of them in the Fields list of the Form inspector, and see which field it links from in the Departments form. If it says “Sister Dept.” then rename the field “Sisters”. If it says it is linking from Child Dept., then rename the field “Parent” (trust me). If it says it is linking from Parent Dept. then rename the field “Children“. Rename all three fields per the above rules.
That should be enough to get you going. Some organizations have both solid and dotted reporting structures. You can easily expand the pair of forms to include “Dotted Child” and “Dotted Parent” relationships.
Hope that helps,
MikeAugust 20, 2017 at 7:18 AM #24079
scneophyteParticipantHello Mike. Despite having no need for an organizational hierarchy, I nevertheless found myself implementing your example for edification purposes only. It was so well-written I found myself wanting to create it and see what I could learn.
If you were to make a weekly Sunday post on interesting TF setups and solutions I would certainly read and follow!
Thanks for posting it.
-
AuthorPosts
You must be logged in to reply to this topic.