However, when I click on the + to create a new record I do not have access to the main record key, Customer Id. Any suggestions on the best way to resolve this? Perhaps stuff the key in the UX somehow? (At least, that is what I would do if there were a real webpage.)
When you say you do not have access to the main record key, what do you mean? I would assume the customer id of your sub table is a ref column to the main (customer) table. And if so, you should be able to get a list of customers to select from more or less automatically..
If you show you column definition (esp. of your cutomer id of the sub table) it would probably make your issue more visible.
You may want to share what kind of expression you are using to navigate to the “inline_View” , in general you could use LINKTOFORM() or LINKTOFILTEREDVIEW() deep links in such a case instead of using system generated “Add” action that will open a fresh new form.
Yes, for my Site Logistics sub-table I have a Customer Id reference to the main table. When I say I don’t have access, I mean that in the create new Site Logistics action I don’t have access to the parent key (have to hard-code this to work): LINKTOFORM(“Site Logistics_Form”, “Customer Id”, “f4d8447d”) Here is the top part of the sub record:
I am sorry that I am not getting your query. If you build LINKTOFORM with
LINKTOFORM( “Site Logistics_Form”, “Customer ID”, [Customer ID], …) I believe you should get it. If you build this action as an inline action.
Just tried that, no luck. The icon does not even show up, indicating that the Customer Id value is not valid. This actually makes sense since there is no Site Logistics row yet.
So the question becomes: Can table view of sub-records have access to the reference to the main record? If not, I don’t see how to create new sub-records with the correct link in this kind of view.
LINKTOFILTEREDVIEW(“Site Logistics_Form”,[Customer ID]=[_THISROW]) if you write this formula in action, child records of related parent record are displayed. Afterwards, if you add a record with the add button, the parentID will appear in the form.
Ah, that did it! Thank you so much, HBT! (For reference, I was trying to create a custom add icon and that does _not_work. For some reason, only the system generated add action created the correct link.) Thanks again, was stuck on that for three days.
Could you please mention what table you are trying to set the action, what is the action goal and how you are trying to set it up? Relevant screenshots will help.
Actually, this issue is resolved. I just had to use the LINKTOFILTEREDVIEW() the way HBT suggested and use the default add record icon. Thanks for your help.
Yes, sorry I saw that the issue is resolved and @HBT provided the solution after I posted the reply. In general I had also suggested using LINKTOFILTEREDVIEW() in the beginning.
“You may want to share what kind of expression you are using to navigate to the “inline_View” , in general you could use LINKTOFORM() or LINKTOFILTEREDVIEW() deep links in such a case instead of using system generated “Add” action that will open a fresh new form.”