Ok, so I've 'practically' solved this using a global container field on my parent layout, which has an associated script trigger which creates the child record, sets the clientID and then sets the child record container field = to the parent global...
And it works...
BUT it seems to result in the file being uploaded to the remote server twice...? and seems like something of a kludge....??
You could filter the second portal to show records only when False. Note that you still have to commit records in order to create a new one.
Message was edited by: Michael Horak
That works great for the empty data entry row! Do you know of any way to make a portal based on the same auto-create relation NOT show the empty row?
Michael, that's brilliant...!
Not sure what you meant about commiting the records, since it appears that dropping a file into the container is doing exactly that, since I'm getting the new records as soon as I release the file into the container...
Bruce - I like where you're going with that, but for now I'm happy with having two (essentially identical) relationships - that's far less 'kludgey' then global fields and scripts (in my view ;-)
Ok - I now see what you mean about commiting the record - though interestingly, this only seems to be necesary if there were no related records already (which is how I missed it first time round)
If there's already a related record in existance, then droppping a new file in seems to immediately commit...
So I still need a script, but a single line 'commit record' is a lot better than what was there
Do you know of any way to make a portal based on the same auto-create relation NOT show the empty row?
Alas, that's not possible, since the ghost record is not evaluated for filtering. If it were, then False would apply to it as well - and the above trick would not work.
Thanks again Michael for the comment. One variation I have tried is to put two child TOs in series, with the first TO having create turned on and the second linked to the first by parent key and line item recID.
This way the portal for the first item can be set up as you describe, allowing a single row for data entry, and the TO2 portal will have no extra line. But then - here we are again adding TOs to the graph. Since the TO are in series then either TO can see "downstream" to other TOs such as for instance a Product table.
My own preference is to turn off auto-create and put a + buttton below the portal. Of course, that wouldn't work with drag'n' drop as OP wanted, but dropping into a global with a script trigger doesn't seem like such a bad option to me.