Tab label color when based on field

  • 1
  • Question
  • Updated 3 months ago
  • Answered
have a page with numerous tabs, and five of the tab labels are based on formulas that concatenate text and the value of a field. If there is no record in the model containing the fields, the font of the label is italics and an ugly yellow. How do I change that without creating a record in that model?

Photo of BrianG

BrianG

  • 162 Points 100 badge 2x thumb

Posted 3 months ago

  • 1
Photo of Mike Dwyer

Mike Dwyer, Champion

  • 3,992 Points 3k badge 2x thumb
You can suppress the tab with a rendering rule: where model has no data rows. Or did you want to change the text color?
Photo of BrianG

BrianG

  • 162 Points 100 badge 2x thumb
don't want to suppress the tab, just have the tab labels consistent color
Photo of Mike Dwyer

Mike Dwyer, Champion

  • 3,992 Points 3k badge 2x thumb
Okay. I'm not clear what you are doing here, as I get different results. If I have no data in IdentityVerification, I get a blank label. If the concatenation formula is part of the tab label, you haven't shown it: where do "Deal Room" and "Credit Summary" come from?

That said, you might look at the conditional form of merge syntax, something like this:

{{#$Model.NewModel.data.0.NewField}}Has data {{$Model.NewModel.data.0.NewField}}{{/$Model.NewModel.data.0.NewField}}{{^$Model.NewModel.data.0.NewField}}No Data {{/$Model.NewModel.data.0.NewField}}

When NewModel does not have data rows, the tab label would be "No Data."

[
My NewField is a UI-only formula field, where the formula is:

     "Name = "+{{Name}}

When there is a data row (from the User table, id is user), the tab label is "Has data Name = Mike Dwyer."
]

Photo of BrianG

BrianG

  • 162 Points 100 badge 2x thumb
so tried this in the tab label -
{{#$Model.IdentityVerification.data.0.DealRoomPass}}Has data {{$Model.IdentityVerification.data.0.DealRoomPass}}{{/$Model.IdentityVerification.data.0.DealRoomPass}}{{^$Model.IdentityVerification.data.0.DealRoomPass}}Deal Room {{/$Model.IdentityVerification.data.0.DealRoomPass}}

and resulting tab reads   Has Data Deal Room (still in yellow)
Photo of BrianG

BrianG

  • 162 Points 100 badge 2x thumb
I've played around with this functioanlity and still can't get it. Even put that merge logic into the UI field formula itself and still can't get it...
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 17,326 Points 10k badge 2x thumb
What version of Skuid are you running on? We ran into problems with yellow edited text a few months ago. It should be good within the last 5-6 versions of Skuid
Photo of BrianG

BrianG

  • 162 Points 100 badge 2x thumb
skuid 9.5.14
Photo of Stephen Sells

Stephen Sells, Official Rep

  • 17,326 Points 10k badge 2x thumb
We would recommend upgrading past 11.2.5
Photo of BrianG

BrianG

  • 162 Points 100 badge 2x thumb
yes, I have UI-only fields on the model like - COMBINE_STRINGS("Deal Room ",{{Deal_room_Verification_Flag__c}})

on the tab itself, the label is {{$Model.IdentityVerification.data.0.DealRoomPass}}
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,680 Points 10k badge 2x thumb
Hi Brian, if you're seeing the font in italics and yellow, that normally indicates an unsaved field value. Can you try enclosing the fields in triple mustaches instead of double mustaches? 
Photo of BrianG

BrianG

  • 162 Points 100 badge 2x thumb
Wow, that did it! Thanks!
Photo of Mark DeSimone

Mark DeSimone, Official Rep

  • 11,680 Points 10k badge 2x thumb
Great! Just to explain why I think this works - the triple mustaches will display only the raw value of the field, and ignore any metadata for the rendering. In this case, the field value was unsaved, and that metadata information was being used for the rendering with double mustaches, but skipped for triple mustaches. 
Photo of BrianG

BrianG

  • 162 Points 100 badge 2x thumb
appreciate the follow up, as that really helps me