Ui only formula with other Ui fields triggers model change

  • 2
  • Problem
  • Updated 3 years ago
  • Acknowledged
Model with two Ui only formula fields (Field A and B) that use Model_Lookup to different models 

I then have a third Ui only field (Field C) that is a formula and subtracts B from A. 

This all works great until the user tries to search the table/model. As soon as it starts searching, it was locking the search bar. I traced this back to the fact it was registering an unsaved change in the model and hence locking the search bar. 

Solutions:
  1. Hitting save/cancel on the table allows the user to continue searching
  2. Removing Field C from the model prevents the unsaved changes issue
  3. Adding a model action to save the model upon requery (seems to be working, but is constantly saving the model)

I'm not sure if its the intended design to have these fields trigger unsaved changes on the model. Saving/canceling does not actually do anything as the formula renders regardless. Right now I'm using solution #3. 2 is not viable as I need the field and 1 is not practical because it interrupts the user as they type. 
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb

Posted 3 years ago

  • 2
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Hi Craig,

This is an interesting problem. Right now, we've landed on a change to a UI-only field will make the model act as if it as been "changed". But locking out your search because of a UI-only change seems a bit silly. We'll have to noodle on this a bit. Thanks for bringing this up.
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
Also, Your #3 workaround might actually not be that bad, because Skuid won't send data to the server unless there's a real field that needs to be updated. You can check for sure by examining "Network" tab in your chrome console.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
Thanks for the response. Good to know about #3. I tested and confirmed. I'll plan to use that workaround when possible for now.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
This no longer seems to work. The save operation makes filters inactive for some reason. Selecting a filter value does nothing. Removing the Query/Save action means I can't use the search bar. This seems to stop working after updating to 7.27.4. Any possible fixes?