Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms 5 › Only one linked values displayed
- This topic has 3 replies, 2 voices, and was last updated 10 years, 6 months ago by
Brendan.
-
AuthorPosts
-
December 25, 2014 at 11:00 AM #12481
Frank NicholsParticipantI think I may have been using conflicting (with you) terminology earlier, so first to clear that up. In the following description I call the SUMMARY the parent/master and the options (COLOR and SIZE) child/details, after seeing how your link to options work, I think you refer to them the other way around.
Lets say I have three forms, the first form is SUMMARY which displays a list of selected options, each record in SUMMARY would allow the selection and display a different selection of options. I can’t use pick lists for this because the options have multiple related values – so, I use linked forms.
Forms 2 and 3 contain rows of options that can be selected by the SUMMARY form. Lets call them COLOR and SIZE.
To setup this relationship I go to the COLOR form and create a field of type Link to Form with a ONE-TO-MANY relationship and select SUMMARY in the Link to Form drop down menu. I also tick the Display Inverse relationship option.
I then go to the SIZE form and create a field of type Link to form and set a ONE-TO-MANY relationship and select the SUMMARY form in the Link to Form drop down menu and then tick the Display Inverse Relationship option.
Both option forms have multiple attributes (fields). I selected in List View Fields the 2 option to display the first two fields only.
Now, I go to my SUMMARY form and create a new record and I can click/touch the COLOR field to bring up the selector and select one of the COLOR records. When I do that the color I selected is then displayed on the SUMMARY form in the COLOR field, as I would expect.
Next I click/touch the SIZE field and I can select a SIZE record.
When I select a SIZE record, the COLOR field (previously selected) is cleared and becomes blank. If I go back and reselect the COLOR record, it is displayed and the SIZE field is cleared.
That is not what I would expect, I would expect the two to operate independently, and I need both to be displayed after being selected. In fact, on my real form I have about 30 of these option links displayed. It would not be very useful for the user to have to click each blank field to see what option had been selected.
I have tested this on both Mac and iPad versions with the same results.
As a side note, on the Mac display I would prefer to not display the controls under each of the LINKED FROM fields (SIZE and COLOR) or maybe to have the option to hide/show them, and then just click on the field to bring up the options – much as it is displayed on the iPad. With a lot of selections in my list (30 or so) having those controls on each row adds a LOT of screen space and clutter I don’t need. It isn’t a deal breaker, but just thought I would mention it. I haven’t created a custom layout with the Mac yet, so maybe that would fix this issue, but it still seems to be a lot of controls that really don’t need to be displayed – or at least could be optional for those that don’t want them.
Thanks,
Frank
December 25, 2014 at 4:05 PM #12487
BrendanKeymasterHi Frank,
So the problem with the ability to only have one inverse relationship is because of the way Tap Forms stores the link. It’s stored on the entire record itself, not on the Link from Form field value. That means that a record can be linked to by only one other record in a one-to-many relationship. I know it seems like it should work with multiple Link From Form fields, but unfortunately it’s due to the location where I store the foreign key. I would need to store an array of values as I do for the many-to-many link type.
So unfortunately I don’t think it’s going to work for you in your scenario. At least not with a one-to-many Link Type.
December 25, 2014 at 5:19 PM #12489
Frank NicholsParticipantI understand. I will continue to monitor you application and wish you well, it is a very interesting approach and addresses a real need in the OSX/iOS market.
Can I assume from your comments that you are not using Core Data? I have been debating writing my own application specifically to solve my requirement and not as a general purpose db manager, and had been looking at core data. If you are not using Core Data, I would be interested in why you chose not to.
Thanks,
Frank
December 25, 2014 at 6:38 PM #12490
BrendanKeymasterHi Frank,
I am not using CoreData. I would have used CoreData if it were available on iOS when I first built Tap Forms. It didn’t come out until iOS 3.0 I think. I built Tap Forms starting from iOS 2 which I believe was the first version there was an SDK for.
I was a long time WebObjects developer prior to doing iOS and Mac app development, so building on CoreData would not be a stretch for me at all since WebObjects’ EOF (Enterprise Objects Framework) was the precursor to CoreData. I also did work on some CoreData iOS apps for another company so I do have experience with it. I actually wish that CoreData had been available when I first started Tap Forms. It would have made some things a lot easier for me. I had to write a lot of code in Tap Forms that I would have had for free in CoreData.
Thanks!
Brendan
-
AuthorPosts
You must be logged in to reply to this topic.