Global Merge not working in UI-Only Formula

  • 1
  • Question
  • Updated 2 years ago
  • Answered
Hi All,

I'm having a problem with a UI-Only formula not calculating correctly. To make it simple, I'm just trying to get the value from another model into the formula first and then I'll add the rest of the formula once I know that's working.

I believe I have everything right, but my UI-Only Field "QtyPerCtns" value should be the same as the value entered in the Job Qty Produced field, but it's not updating! I know it should work, but can't figure out why its not.

I have the JobSelect Model above the Receiving Model which is where the UI-Only field is located.



Any idea what would be causing this?

Thanks for the help!
Photo of Sam Becker

Sam Becker

  • 1,168 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,240 Points 5k badge 2x thumb
Sam~

What is the order of your models? You need the parent model (in your case the model your UI only field is referencing) above the child model (the model with the UI-Only field) for the reference to evaluate. If the child model is above the parent model, the child will attempt to find the value of the parent which has not been loaded yet.

Hope that helps!
Karen
Photo of Barry Schnell

Barry Schnell, Champion

  • 18,076 Points 10k badge 2x thumb
Hello Sam -

As Karen mentions, the order of your models is important.  If the model that has the formula is listed first, you'll run in to this issue: https://community.skuid.com/skuid/topics/uncaught-typeerror-cannot-read-property-displaytype-of-unde....

However, even if your models are ordered as needed to avoid the above issue, Formulas that contain global merge syntax are not being updated.  This appears to be a bug as well. I'm still waiting on a reply from Skuid on this but see https://community.skuid.com/skuid/topics/formula-field-value-not-updating-when-new-row-is-added-to-m... for detail.  The sample page in that post only contains one model so it eliminates the "ordering" issue all together.
(Edited)