Another Relationships question

Discussions for the HanDBase for iPad and it's conduits and desktop add-ons

Another Relationships question

Postby kwmatley » Wed Apr 27, 2016 4:58 pm

I've searched and found a number of topics that deal with Relationships, but none of them clarify the problem I'm having. Sorry if this duplicates someone else's question.

I just added HanDBase for iPad to the copies I have for iPhone and Mac desktop. I'm trying to set up a pair of linked databases in order to keep a log of my beehives. Database one (Hives) has basic information about each hive (location, date established, etc.) and Database two (Inspections) has the results of each inspection for each hive. One of the fields in Hives is "inspections," which links to the Inspections database. The field 'Hive' in Inspections is linked to the field "Inspections" in Hives, so that when I click on the link in Hives it takes me to Inspections, where I can add a new record for that particular hive. Sorry if that's a bit confusing, but I didn't anticipate having to explain the structure when I created different databases and fields with the same names.

The problem I'm having is that I have added some fields to the Hives database that I'm trying to get to reference dates in the Inspections database. One of these fields is "Last Inspection," and I have it set up as type Relationship as follows:

Related Field in this Database = Hive
Other Database Name = Inspections
Field in Other Database = Hive
Show From Other Database = Inspection Date
Last Matching Record

When I add a record to Inspections, I was expecting to see the date of that record pop up in this "Last Inspection" field in Hives, but the field comes up empty. If I open the record for that particular hive in Hives and click on Edit, the "Last Inspection" field is blank, but has a '>' at the far right of the field. If I click on the '>', I am transferred to the Inspections database, with 0 records showing (just like an improperly configured link). The same thing happens with the other Relationship fields I've added.

Now, I've set up Relationship fields in other databases that have worked as expected, but I cannot figure out how to make it work in this database pair. I'm speculating that since the 'value' I'm comparing in the Relationship is the contents of a pair of linked fields, that the fields are not being treated as equals by the Relationship function. Could this be the case, and if so, is there a work-around I can use to get these two databases to share data?

Hopefully my description is not too garbled. After several days of trying to get this to work my thinking is certainly garbled.
kwmatley
 
Posts: 4
Joined: Wed Apr 27, 2016 4:08 pm

Re: Another Relationships question

Postby kwmatley » Sun May 01, 2016 10:27 pm

OK, I think that the problem was the linked fields. I added a conditional field called "name again" to the Inspections database and set it to show the contents of the field "Hive." When I used this field as the "Field in Other Database" the relationship worked as expected. Now, I set the condition for this field as "is not equal to" and set a value of 0, with a result displaying the value in "Hive." I also set the 'else' result to display the same value. This seems to work fine, but it's a bit clunky. Is there a cleaner way to display the value of one field in another field of the same database? Thanks.
kwmatley
 
Posts: 4
Joined: Wed Apr 27, 2016 4:08 pm

Re: Another Relationships question

Postby Brian_Houghton » Mon May 02, 2016 10:34 pm

Hi,

As you suspected, the issue would be that the relationship field is attempting to perform on a link field. Using a conditional field to return the link as plain text and perform your relationship on that value instead!
Kind Regards,
Brian Houghton, DDH Software
Brian_Houghton
 
Posts: 2246
Joined: Wed May 20, 2009 8:30 am

Re: Another Relationships question

Postby kwmatley » Wed May 04, 2016 8:33 pm

Thank you. All working now.
kwmatley
 
Posts: 4
Joined: Wed Apr 27, 2016 4:08 pm


Return to HanDBase for iPad

Who is online

Users browsing this forum: No registered users and 1 guest

cron