Posting here in case someone might run into a similar problem.
In my database I have a field called data.Localdatabase.costPrice I have linked it to an Input field, which is located inside a Cell#1, located inside row called “Cost price”.
There are formula that decides Visiblity of" Cost Price" row and also Visibility of Input Field (so 2 levels)
When the app starts both fields are hidden as per logic in place, but what happens is that the downloaded record assigned to Input field - data.Localdatabase.costPrice - disappears. I disapears both on the screen (when you make the fields visible later) but also in the underlying data as seen in the debugger.
So hidden Input field inside another hidden field - “deletes” the assigned value.
If this is just a single hidden Input field inside without any components level above that are - it all works fine.
I have changed it to remote the nesting and it seems to be working fine.
Nope, I think the reason is different. If I assign variable to an Input field and make the visibility depending on if the variable IS_EMPTY() the variable becomes empty… Is this a bug?
This sounds weird, and I haven’t encountered this (and I use !IS_EMPTY a lot in visibility stuff)…… So have you checked that if you take away this visibility setting the variable is not empty? The IS_EMPTY formula does not modify the original data at all.
Hi, I was able to repro this bug. It really is a weird one… I’ll put this to our backlog to be fixed. It seems that if you use the same data variable as an input and as a visibility condition, the visibility Formula will evaluate incorrectly.
I tried to find a way for you to go around the issue and I think I found one. Try using a Formula with just data.LocalDatabase1.property2 as visibility condition. The editor will complain that it isn’t assignable to true/false, but it’ll still work. Or at least in my repro it is was possible to use it like that. Let me know if this doesn’t suit for you or if it doesn’t work in your real app.
Or, you could use the record as page or app variables if that feels suitable.
I have actually found a workaround already (without using the variable itself as a visibility trigger). I just built this to reproduce the isusse as this is a very weird bug indeed…
Pressing the regular button with exactly the same logic does not crash the app.
Pressing the icon button without the preceding if the module does not crash the app.
Pressing the icon button when the parent container has visibility setting true also does not crash the app.
I found out what is causing the issue really by trial and error connectin and disconnecting different elements. It would be helpful to have some crash reports. Sometimes the app crashes really without showing anything in the debugger (as it just shuts off) like e.g. in case of the dropdown component (if feed with “undefined” values,but that’s separate issue).
I tested this app, but did not have any crash on pressing the icon button (either with web or iOS, using 1.9.15). Are you still experiencing the crash? How can I reproduce it? I pressed the first repeated list item and then pressed the icon button.
I checked out your video and tested this out on Android and indeed, while it doesn’t crash on iOS/Web, it does crash on Android
The good news is that this doesn’t crash anymore with the beta client (2.2.0), so whatever problem there was, has been fixed with the new client update. If you can wait until 2.X is out, I recommend doing so, but if you can’t, I can try if I can figure out a workaround for you.