Brett Reed:
Hoping someone here can give me a nudge in the right direction. When a “View” button is clicked from a list of orders, a namedAction runs that sets the id of the order into the app model as app.activeOrder. Then, the action script ideally would navigate to the directed url once the id parameter has been concatenated from the app model. Via general research and the AI Assistant, I’ve been experimenting with the appropriate syntax to use to concatenate the url but I keep coming up short. When the page loads I have the id in the app model (where it’s supposed to be) but it doesn’t appear in the url. This would normally make me suspect my syntax is off, but subsequent button presses render the url id in the url as expected. Can someone give me some insight on this?
Linxue Ren:
Hi Brett, you can use “function” to edit the path like
"action": "path",
"function": "action.options.path = '/orderdetail?id=' + app.activeOrder",
"options": {
"path": ""
}
Brett Reed:
Thank you so much! That’s exactly what I needed!