April 13, 201213 yr I've attached a copy of my database file. I'm trying to create a conditional value list that populates in a portal with two fields that contain value list. I tried to follow the setup of a an example I found online. It appears I did something wrong. I can't find it. Any chance I can get someone to take a look and see if you can tell what I'm doing wrong? Also, I've got something funky going on with the portal. When I add a portal record it seems to add two rows.. when I try to delete the portal row--it doesn't. Any suggestions would be most greatly appreciated. Thank... mp ConditionalPortalValuesProblem.zip
April 13, 201213 yr I've attached a copy of my database file. I'm trying to create a conditional value list that populates in a portal with two fields that contain value list. I tried to follow the setup of a an example I found online. It appears I did something wrong. I can't find it. Any chance I can get someone to take a look and see if you can tell what I'm doing wrong? Also, I've got something funky going on with the portal. When I add a portal record it seems to add two rows.. when I try to delete the portal row--it doesn't. Any suggestions would be most greatly appreciated. Thank... mp As for your conditional value list: If (as I'm guessing) all you want is a dynamic list of all values a given person has in a specific fields (field “Type” in this case) in his/her OUTREACH records, there is no need to add a cartesian instance of the OUTREACH table behind itself. Simply use the existing _STAFF - _OUTREACH relation to have this VL compiled on the fly. Since you don't need the Portal.Values TO, redirect the portal and its fields back to _OUTREACH - which you have to do anyway, because otherwise each STAFF record will show all OUTREACH records in this portal, not just the ones belonging to that person. For the funky portal stuff, check the relationship settings for TO PortalValues.OUTREACH in Manage Database. It is set to “Allow creation of records in this table via this relationship”. Any portal based on this relationship will provide a “spare” portal row to let you do exactly this: create a record on “the far side” via the UI, which happens as soon as you commit data in a portal field. (If you enter data and delete or cut them before clicking outside, no new row is created.) Contrary to what the option implies, you don't need to check this option if you let your users (or yourself, for that matter) create child records using a script; the option only affects the behaviour of a portal. Compare with the per-portal-option “Allow deletion …“, which by the same token is not required for deleting child records via script. So, what happens when you add a new record/row via script, is that FMP will create the record, return and show the new row, and the „spare“ row slides down. Trying to delete this row via script (or manually) is not possible. Simple solution: for portals which are populated via script, in Manage Database don't activate “Allow creation …” for the relationship the portal is based on. Hope this helps. eos
Create an account or sign in to comment