How can I conditionally render a page title button based on a UI Only field from another model

  • 1
  • Question
  • Updated 2 years ago
  • Answered
I am looking to conditionally render a page title button based on a UI Only field on a different model (an aggregate model)
Photo of Curtis Ellingham

Curtis Ellingham

  • 362 Points 250 badge 2x thumb

Posted 2 years ago

  • 1
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,260 Points 5k badge 2x thumb
Curtis~

You absolutely can do that. I have my page title on a basic account model and here is what I put on the button on the page editor (using a UI checkbox) ... 




Please let me know if you need any more assistance with this.

Thanks!
Karen
Photo of Curtis Ellingham

Curtis Ellingham

  • 362 Points 250 badge 2x thumb
Karen,
I tried something similar and it did not work.  I created a UI Only field on the Aggregate model named Difference that is just a formula based on 2 other fields in the aggregate, then have a rich text component that is set to render only if Difference = 0.  When I preview the page I get the following error: 
1. A Skuid Model, 'ChildAggregate', requested a Field with relationship name 'Difference', on the Opportunity Object, but Skuid could not find a valid Field accessible through this relationship name. Please check that this Field actually exists on this Object (or on any related Objects). If it does not exist, remove it from this Model.

I can pull the UI Only field onto my page, but cannot render based on the result
(Edited)
Photo of Curtis Ellingham

Curtis Ellingham

  • 362 Points 250 badge 2x thumb
I solved it by setting the conditional render based on a non UI Only field and then editing the XML to direct it to the UI Only field
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,260 Points 5k badge 2x thumb
Curtis~

Glad you were able to find a workaround in the XML! 

Thanks!
Karen