Strange behaviour with inline child views not allowing adds or updates on parent form randomly

Hi, I have a really annoying bug I've spent days trying to sort out but after downloading the Nested Forms demo app and making a slight modification, it seems this bug happens in a very simple app.

I would publish the app to help, but I'm on a free account and it won't let me.

Basically, the mod I've made to the Nested Forms app is to create two slices of Child

Slices Of Child.jpg 

The ChildRO slice Update Mode is set to Read Only(RO) and the ChildUAD slice Update Mode is set to Updates, Adds & Deletes (UAD). Obvioulsy, I have set the table properties of the Child table to allow Updates, Adds and Deletes.

The relevant Ref_Rows have been used to link the 'Child' tables to the Parent table.

I've also added a property to the Parent table - 'Complete' as a Y/N field. 

The idea is that in the Parent view form, if a Parent is set to 'Complete', the RO Child slice is used and if the Parent is set to 'Complete'=False then the UAD Child slice is used. This is to only allow the user to add children to parents who are NOT set to complete. This is achieved by using the show_if function on the 'Complete' property for the related  RO or UAD slices

This is very simple stuff and works fine in the Parent 'Details' view where you can add children or not depending on the 'Complete' property. However, I don't like data being added to the Parent in the details view so I only want to allow the user to add children while editing the parent - IE in the Parent View Form.

When I first set this up, I did it before I added the 'Complete' property and so had both RO and UAD child slices in the Parent View Form as inline views. Initially they had the appropriate 'Add New' functionality on the UAD inline view and not on the RO inline view as I expected.

As soon as I add the 'Complete' property, I find the process breaks as the UAD inline view  either refuses to show or does show, but doesn't have the 'New' record function on the inline view so no data can be added.

Most annoyingly, when I take the 'Complete' functionality and relevant 'show_if' code out, the UAD inline view does not re appear or if it does, it doesn't show the 'New' record functionality again. It's almost like the show_if functinoality is being kept somewhere within the background code - but it's really not consistent at all so that may be me reading far too much into it!

In frustration I put all the functionality back in and this time added the Childs data table (as well as its ChildRO and ChildUAD slices) back into the Parent View's Form using inline views. This Child table works as  expected but not the UAD slice.

This is where I have it now and have taken the following screen shots to see if anyone can help or recognise it as a bug. You can clearly see in the Parent View's Form that the Child's table inline view has the 'New' record functionality, but the ChildUAD slices' inline table does not - even though the Add, Edit and Delete Update Mode is correctly set on the ChildUAD slice. Please excuse the formating of this post - new here!

Any help much appreciated to undestand why this is so random.

If anyone can take the sample app (Nested Forms) and mod and recreate the issue and share it, that would make it far easier to understand than my screen grabs.

App View - Parent Form - Complete.jpg

App View - Parent Form - Not Complete.jpg

 

 

 

 

 

 

 

 

Parent table.jpg

 

 

 

 

 

 

 

 

ChildRO slice.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ChildUAD slice.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Related Childs (Table) properties.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

ChildUAD slice properties.jpg

 

0 4 336
4 REPLIES 4

There are actually 3 "levels" to check when an Add button is not displaying - Table, Slice and then the Add action itself.

Do you have any Behavior logic implemented in the Child Table Add action that may be hiding the button...

Screenshot 2023-07-03 at 3.44.02 PM.png

Thank you for your response. It's a good point but as this was a fresh project based on the Nested Forms demo app from Appsheet, there wasn't any logic added to the actions. Also, I think the actons just refer to the collection of Children views rather than the inline views which seem to get their 'New' buttons automatically depending on the Read-only etc nature of the table or slice.

I have my own app which is much more complicated which is why I used the demo app to prove it wasn't my logic at fault. I believe this is a bug in Appsheet itself. 

I have found a workaround for it as you can use the Parent table of the two slices for the writeable record (so therefore, I'm using the Child table itself instead of the ChildUAD slice).

The thing is, I could get it all working and then (as I said before) just adding a little extra feature to only have the read-only slice show when the parent is locked using the Completed flag on the parent table, completely broke the logic. Removing the completed test didn't make the app work properly again. Something else is going on in the background - unless I'm being a total numpty here (perfectly possible!). It just seems very random. I hope I'm wrong as I'd really like to feel I can trust the appsheet logic - it's usually so good. 

Thanks for trying anyway.

Hi @Edward_Wright 

Your detailed explanation is very similar to my problem. I too noticed some frustrating problems, although I am not sure that they are necessarily bugs, as such. I had a Grandparent - Parent - Child setup and had a lot of issues getting the Child view to show correctly. Despite following the numerous instructions I could not get it right for ages. Eventually, I got it working, all good. However, by making a very small and insignificant change, I lost the view again. The change was only to hide a field. But now my view is all out of order and I cannot display some fields in my Child inline view. The detailed and form views are ok. I spent ages sorting it out, now it is back to my original problem.

I just wanted to echo your frustration, not offer any solution I am afraid. However, by retracing my steps I have partially resolved my issue. But to do this every time I make a change seems to be a bit overkill.

Anyway, thank you for your thread it has been interesting.

Test this by adding a couple of new Table views into your app and link each new view to one of your child slices.

Switch to the view for the writable slice and verify that the system Add button is showing prominently on the view.  Do the same for the read only slice and verify that the add button is not showing now.

Also remember that each slice definition has the option to remove actions from the list.  If you want all the default actions to be available let the slice actions show as Auto assign.

scott192_0-1742899330325.png