Initial Value Error

Ben_Rix
Participant V

Hi Everyone,

I seem to be having an issue with the initial value not working.

^ This screenshot shows the form that is to be filled out. Then I have an option to create a new case from the form. Now, in the past, the clients name and location would be automatically filled out in the next form which would be the clients case. I have had a look and it seems nothing really has changed in my app.

Any ideas as to why it could have stopped.

Regards
Be

0 14 479
14 REPLIES 14

Ben_Rix
Participant V

I have just gone back into an older version of the app and found a version where is was still working and I cannot see anything different as to what is stopping it from working.

Let us put our hands on the palantir and see what expression you have in your initial value property of the respective column.
3X_4_6_465ea24488b4ab89f3eefbaa36f21d0654a121a7.jpeg

Ben_Rix
Participant V

Hey Levent,

Thanks so much for replying, So this is a screenshot of what i have.

It is the client column and clinic referral column.

Regards
Ben

Have you tested both expressions with the Expression Builder? If the initial value is returning a blank value, then it denotes that the de-ref value is also blank. If de-ref is blank, then it denotes to a problem with the ref value.

Ive just tested it and it is returning the correct value. It just doesnt seem to be returning it in the form. I did read that the column value needs to be created before this should work. But, It has worked in the past and still does work on an older version. To be honest, I could just revert to the old version and redo the adjustments iโ€™ve made, but, I would love to know what is currently stopping it from working.

Without choosing a value from [Our Ref] column (or pre-select a value via Initial Value), those de-refs always return a blank value.

MultiTech
Participant V

@LeventK I was just going to post about something like this.

Iโ€™ve got a standard ref, with no modifications made to the child tableโ€™s Add action, yet the initial value is not being set by the add button when I press it.

Has the Add action always been like this? I thought it was a CONCATENATE() building the deep link or something?

@MultiTech_Visions
Matt, if Iโ€™m not remembering it wrong @Steve had posted about this before and I had also discussed with him as well. When you add or edit a record and click on the New button of the reverse ref, it automatically assigns the parent ID, correct? However, the situation is not the same when you use the Add button from the related records inline view because actually youโ€™re fetching the Form UX of the child table where the app cannot now from where the form is executed. However on the other side, you launch the child form from the parent directly and therefore it knows where itโ€™s executed and preserves the link.

What I have done in the past is make a ref view without the add button so the user has to use the New button and all the relevant data is included.

LeventK
Participant V

@Ben_Rix
Just a sweet reminder to check this post as well:

So this is the currrent updateโ€ฆ as soon as i reinstate the older version and attempt to add a new row in the child table from the parent table, using the inline add button, it stops working. before its reinstated it works fine.

MultiTech
Participant V

I was just going to chime in here and say, this is always workedโ€ฆ Up until today.

I havenโ€™t made any changes to this system that I showed inside the video above, itโ€™s been that way for maybe six or seven months at least.

But todayโ€ฆ It stopped working.


Upon checking, that Ref_Rows() is wrapped in an OrderBy().

I guess Iโ€™ve been working with an app-bug this entire time. (It was a wonderful bug though, wish it was SOP.)

Hmmmโ€ฆ this means Iโ€™ve got to go through and โ€œfixโ€ all the apps that are now โ€œoperating properly.โ€ Oi vey

Ben_Rix
Participant V

Ahhhh, if that was a bug, it worked really nice. Is there a work around so that when a new parent row is added, the line item can be added without having to save the parent form first. It reduces an unwanted step of having to save the form, then having to go back in and add the details.

I assume youโ€™re using โ€œIs a part ofโ€ = true for thisโ€ฆ

The hard answer would be no; youโ€™ll need to remove any modifications youโ€™ve made to the Ref_Rows() formula of you [Related Whatever] column - then the parent link will be carried over when adding in related child records.

If you still want to preserve your ORDERBY(), FILTER(), etc. modifications to the Ref_Row() formula...

Youโ€™ll need to create a duplicate virtual column that contains the bare Ref_Rows() formula.

  • Most likely, AppSheet has detected youโ€™ve modified the system generated Ref_Rows() formula and regenerated an additional column already.

Take this โ€œextraโ€ column, and put a Show_If formula of the following:

Context("ViewType") = "Form"

This will only show that field inside the form; on your other columns, put the inverse of that so they only show OUTSIDE the form:

Context("ViewType") <> "Form"

Youโ€™ll have duplicates virtual columns, which sux, but it would allow you to have both the โ€œRef Magicโ€ and any modifications you need to make to the lists all at once.

Top Labels in this Space