August 31, 201114 yr Just asking a general question about portal behavior. I have a portal and i had put an "X" to delete records but this was put in my Orders table. The portal was based on my Line Items table So this is what i noticed. If i use the icon from the orders table this is the effect: What i did was create a new field in my lineitems table to lookup the orders trash "X". and i get this: I would like to know why i get the undesired repeating field when i think it shouldnt matter? thanks
August 31, 201114 yr The relationship the portal is based on is set to allow the creation of related records. This produces the blank row at the bottom.
August 31, 201114 yr Doesn't answer your specific question but is related to it ... If required, you can create a conditional delete button that will not show in the portal (with auto creation enabled of related records) when there is no record. Use a calculated field (result text) If(IsEmpty ( portal primary key field );"";"X") Use this calc field - conditionally formatted to show a red X - as the delete button with a script that does nothing if there is no portal row record but deletes the related record if used when one exists.
September 26, 201114 yr Author Efen, if the calculated field does the calculation and inserts the "X" only if the primary key is not empty, then what am i conditionally formatting? can u please give me an example ? i am confused. what would the condition be i guess is what i am saying since the calculation took care of it? -i
September 26, 201114 yr Like the attached - although this just uses a conditionally formatted text object delete.zip
September 27, 201114 yr Author Efen, So based on this post: Use a calculated field (result text) If(IsEmpty ( portal primary key field );"";"X") that is irrelevant to your file TOTALLY!! that is what was confusing me, but in your file, your conditional child::_pk - true then turn Text RED THen your script checks if ID field and asks if you want to delete portal row. Thanks for making me not think i was crazy .. YET!!
September 27, 201114 yr Author 2nd version seems like why bother when your 1st method is much cleaner & simpler. -i
September 27, 201114 yr 1st method is much cleaner & simpler That's why I attached the first file rather than the one with the extra field - which I only posted because you seemed to have trouble understanding how it worked in a previous post
Create an account or sign in to comment