May 15, 200520 yr Ok, I have a portal of only 4 rows. I want to show all the portal records based on and empty field. If portal field has been entered, than it should not show. I am workin with 5.5 so it is not as simple as 7's adding another relationships based on the filter critera. Any ideas? Many thanks in advance!
May 15, 200520 yr "so it is not as simple as 7's adding another relationships based on the filter critera." Well yes it is. In your child file, create a cEmptyField calculation (text) of: If(IsEmpty(thatField); MainID; "") Then create a new relationship from Main:MainID to newRelationship::cEmptyField. Then base your portal on this relationship.
May 15, 200520 yr Author I don't know where I went wrong but... now I only get one entry per portal and it is independent of my empty field! Here is what I did. In child, created new field, cEmptyField with calc of if(IsEmpty(dateReturned), familyID, "") In parent, created relationship between parent/child with two fields link of parent:familyID to child:cEmptyField Then I switch the portal relationship to this newly created one. My main goal is to have 4 rows of portals where if a family has already checked out there quata of 4 items and not returned them back, then all 4 potal rows will be filled and the database user can not let them check any out. However, if they only checked out two unreturned items, the database user can then fill in the remaining 2 rows for new items to be checked out. Thanks for your patience!
May 15, 200520 yr This should work for you. Things to double check: 1) Make sure your portal is based upon the new relationship. 2) Check each portal field and make sure it matches this same new relationship. 3) cEmptyField should be a calculation (text) and make sure 'Do not store' is unchecked. It should be indexed because it's used in the relationship. 4) Make sure the fields are well within the portal - particularly don't let the field boundaries touch the left or top of the portal boundary. If those things don't work, you may need to post your file so we can identify the problem with it. I suspect #2. Did you remember to change your fields to this new relationship also?
May 19, 200520 yr Author Thank you, thank you, thank you! I forgot number 2! But now I can't add any new records in my portal because my relationship is now invalid! I think this might be due to the relationship being based on a calculation field. Is there a work around for this? I know, I am nothing but trouble! A zillion thanks in advance!
May 20, 200520 yr "I think this might be due to the relationship being based on a calculation field." Calculations are used all the time in child-side of a relationship and work a sweet treat. But they can't be based upon a related field, a global or an aggregate function. AND, they can't be based upon an unstored calculation ... can't use Status() functions. 1) Re-verify point #3 above. Unstored must be unchecked in Storage Options and it should be a calculation and not a standard field or a global. 2) You probably just need to set the checkbox option to 'Allow Creation of Related' in your new parent:familyID to child:cEmptyField relationship. Allow creation on the Child side. No matter whether DateReturned is text or date (or even number), IsEmpty() will work so I doubt is a data-type mismatch. Last thing to try: Place cEmptyField and ReturnDate both on a table layout in your child file and take a look. Is it filling cEmptyField properly with the FamilyID?
May 24, 200520 yr Author Upon review, I had a whole lot of things not working with my relationships. Thank you so much for taking the time to answer my questions!!!!
Create an account or sign in to comment