Skip to main content

I am trying to build a dashboard using Skuid and am using Rich Text components to display budget goals vs. actuals and the associated variance amount and variance %. I would like the variance amount & % to display in red if negative & in green if positive. I have tried having two components and using rendering to only show them if the amount is < 0 or > 0 based on the formatting. But, I can’t seem to get it to work. The variance amount and variance % fields are custom formula fields I have setup in Salesforce. The rendering basically shows it or doesn’t show it, regardless of the value. Am sure I am just missing a step. And I am very new to Skuid. This is my first project in Skuid. Any tips?

Hi Stacey!  

Thanks for your question, there are a few ways to go about this.  I like your idea of the conditional rendering on two components, and that should work!  

Can you take a screenshot of your rendering conditions?  One thing to confirm is that you have checked the variance fields in the model itself to bring it into the Skuid UI.  If it’s not checked in the model, then the conditional rendering is basically looking at a null value.

Thanks!
Christine


Hi Christine. Thanks for replying. I think I figured it out. The fields were part of an aggregate model. I realized for this particular use case, I don’t need an aggregate model, so I changed it to basic and the same rendering setup worked! Not sure why the aggregate model rendering didn’t work. I’d love to know any other tips for conditional rendering if you have a few. Thanks for your help!


Awesome Stacey, glad you figured it out!

Remember, when using aggregate models, in order to reference the fields, you need to use the field alias name instead of the field API name.  This may take a little XML hacking to work in conditional rendering.  See this previous post from Rob that describes how to go about conditional rendering with aggregate models:

https://community.skuid.com/t/conditional-rendering-based-on-sum-in-aggregate-model

Hope this helps!  


Thanks for the link. I can see this being needed when I have to create the management version of this dashboard. 


Reply