Forum Discussion
Hey Efvrno,
It's crazy that you just made this post as this is a problem that my current company has going on right now. I built out your idea in a test environment but the proxy field does not pre-fill in the form like the related field does. Is there any other trick to this?
.. are you in Legacy Forms? This only works in Legacy forms at present, not New Forms.
- jross8 months agoQrew Cadet
Hey Mark! Oh yes, I am ALWAYS in legacy forms. haha (New forms are still too slow and clunky for me but that is a separate topic)
To be clear, the proxy field does fill, but just with the RID/Key of the parent. Once the record it saved, it then switches to the value of the field I selected.
- MarkShnier__You8 months ago
Qrew Legend
OK, the behaviour I see is that if I explicitly put the proxy field which in my test case was called [Parent Name], on the grid edit report, then it auto populates that field with [related parent] when I add records and grid edit mode.
So you're right that's not a greatest user experience because [related parent] is a meaningless field to the users.
But I also see the behaviour that if I don't put the [Parent Name] field on the grid edit report at all, then the user is not confused by seeing [Related Parent] and they can just enter children, which end up being properly attached to the parent. Interestingly, if I make the field [related parent] required then the save will fail if the parent is an ADD mode meaning that I cannot add children in add mode. But when I make related parent not required then it performs beautifully. I'm sure there is quite a bit of magic under the covers to make that happen and unfortunately that advanced functionality is not yet available on new style forms. Hopefully that will be a feature they will come out with on New forms, and it's one that I'm advocating for though some feedback channels.
- jross8 months agoQrew Cadet
Well let me explain a bit what we are trying to do, with some generic names for company privacy of course.
So, we have a table called "Work", and under that table we have a child table called "Equipment". The Equipment table is also a child to a table called "Equipment Templates".
So, basically the Equipment records are instances of using the Equipment in a "Work Record". The Equipment record gets its' information from the Equipment Template table. So the problem is that we only want users to be able to, from the Work record form using an embedded grid edit report of Equipment, to be able to select Equipment Templates in which their "Customer ID" matches the Customer ID from the Work record.
This is all fine in the form, but in grid edit, the users can select any and all Equipment Templates which opens us to mismatched equipment templates.
With the original suggestion I replied to in mind, I setup a proxy field from the Work record to push "Customer ID" down as a proxy to the Equipment Table. But, in grid edit, since the field defaults to the key field, it tries to match things base on the keyfield which obviously doesn't work. Now, if I save, and turn a blank row into a record, it does turn the proxy into the Customer ID value, but then we have completed lost the advantage of using grid edit... haha