gczychi Posted April 2 Share Posted April 2 If you need to have the option on in the relationships diagram: "Allow creation of records in this table via this relationship", you will always have an extra empty row at the bottom of your portals (see here). But if you don't want the extra empty portal row to be displayed, there is a workaround: You can conditionally hide all the fields in your portal, for example when the record is empty. In Layout mode, I enter into the box: "Hide Object, when" the following code: isEmpty ( Relation_to_Table::id ) This is only cosmetic, but nevertheless, it works great: Now, only those portal rows appear that have values in it. You might need to adjust background colors, etc. Hope this helps someone. G. Link to comment Share on other sites More sharing options...
Søren Dyhr Posted April 2 Share Posted April 2 Another way is to have both a creation method as well as a presentation layer drawn in the realtions graph, where only the creation method allows entry in the last related record, due to the "allow creation ... " - the problem being littering the CSS with all kinds of nooks and crannies... --sd Link to comment Share on other sites More sharing options...
comment Posted April 3 Share Posted April 3 14 hours ago, gczychi said: If you need to have the option on in the relationships diagram: "Allow creation of records in this table via this relationship", 14 hours ago, gczychi said: You can conditionally hide all the fields in your portal I see a contradiction here: Normally, you allow creation of records via a relationship so that users can add new records by entering data into the first empty portal row. If all the fields in that row are hidden, they won't be able to do that. I hide only objects that would be a distraction to the user - for example, a delete button or a calculation field that would evaluate to 0. Here's an example I posted recently: Link to comment Share on other sites More sharing options...
Søren Dyhr Posted April 7 Share Posted April 7 (edited) It should also be noted that conditional formatting, calculated hides as well as portal filtering very often slows down the rendition of a record - due to excessive use of unstored calcs! --sd Edited April 7 by Søren Dyhr Link to comment Share on other sites More sharing options...
gczychi Posted April 11 Author Share Posted April 11 Quote I see a contradiction here: Normally, you allow creation of records via a relationship so that users can add new records by entering data into the first empty portal row. If all the fields in that row are hidden, they won't be able to do that. I hide only objects that would be a distraction to the user - for example, a delete button or a calculation field that would evaluate to 0. There is only a contradiction if user needs to add new records into the portal. In this case, I only need the «Allow creation of records in this table via this relationship» for scripting purposes. It’s infinitely easier to add new records using the Set Field script step (from a related table) than using any other way to add new records from within a script. G. Link to comment Share on other sites More sharing options...
comment Posted April 11 Share Posted April 11 21 minutes ago, gczychi said: It’s infinitely easier to add new records using the Set Field script step (from a related table) than using any other way to add new records from within a script. I see no difficulty in going to the related table and creating the records there. Sometimes it is easier to use a relationship, but the difference is minute, not "infinite". If there is a need to show a portal based on the same relationship, I would much rather add a few steps to the script than muck around hiding the objects in the portal. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now