Skip to main content

Hey everyone!


I am running into an issue when I try and set a default value into a new rows (not in context). I am using merge syntax to use the first value in the model. It does write correctly, but either when I tab into the field it will either delete the value or throw the following error “Invalid Reference Id: Application”. Now if i were to use the search box and look up that exact same value that is getting written via the merge syntax, it will work and allow the record to be saved.


I have the actual application ID and Name on the page layout as it is a valid record.


Not sure where I am doing something wrong, knowing me it is probably some super tiny detail or spelling mistake. If you have any thoughts let me know!


The merge syntax is for setting an Application Name to a Fee record:

{{$Model.app.data.0.Name}}


Quick Question:


I’m a little confused as to what I’m looking at. I’m not sure if you’ve edited the title/label but I’m not sure if your page looks like it should be doing what you want it to be doing.



Could you elaborate a little bit more on your set up?


It is kind of like a development page. I usually do some sort of proof of concept on a fairly basic page to figure out what needs to do what and how I can accomplish it before I move the concepts to my broader fully built page. (Kinda similar to how you would do work in a sandbox and then push it too production)

So the fact that you are seeing the Application field set, is so I know that the merge syntax that I call at index 0, is using that record and when it is filling in the name field, I know that it is filling in the correct name and so on and so forth. 

Eventually I will be taking a Fee Library model of sorts, setting conditions and then using the row/rows returned and creating a new record on the Fee table, which is what the bottom table is showing. 

Hope that helps clear things up.

Richard


Sounds like a good method of delegation. I like it.

I assume that {{$Model.app.data.0.Name}} is returning A-0113 everytime. But it looks like that is the “Application Name” instead of the “Application”. It could be that Application is bringing back “Invalid Reference Id: Application” because it’s wanting something else. I’m guessing if I was to press the magnifying glass in the Application edit bar, “A-0113” isn’t an option.


So when i press the magnify glass and search the value it does show up and does allow me to save the value. So in doing that, it will then populate that Record ID field for the application and it does match the ID that is shown in the application field editor



So this was me having a long day and forgetting that for the reference to work i would need to pass the Id in, and not the Name.


Wonderful!

All good to go?


Yes!

Thanks!


Reply