On the mobile builder I have an object for Orders and a button that creates a new Order and all of the detail required.
I then have a product grid view and a button within this that adds a new “Order Item” record, allows entry of quantity etc and inserts the Product Id as a default field
Inserting the Product Id as a default field value is ok as the button sits within the context of the Product model but I also need to add the Order Id to the Order Item record to ensure that the Order Item is attached to the Order as a child but for the life of me I cant find how to find the Order Id given the button isnt within the Order model context.
I have tried every combination of {{Orders__r.Id}} I can think of and I am not familiar with writing snippets to achieve this?
Is there a simple way as it sounds simple to me )
Page 1 / 1
David,
I’m not familiar with the relationship between products and orders, but if there is a relationship between them, you should be able to navigate that relationship with merge syntax. Otherwise, you can access the Id of the first row of the Order model with global merge syntax: {{$Model.Order.data.0.Id}}
Thanks Matt … that worked. I had tried merge syntax was had left off the .data … really appreciate the help!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.