Button Properties

  • 1
  • Question
  • Updated 9 months ago
  • Answered
My question is about button set properties.  The button set properties have the option to set the Context Conditions (where id = id of row etc).  In what situation would this be used?  I typically have been setting the Model to the button, but not sure about the Context Condition property

Thanks
Photo of Ann Kukich

Ann Kukich

  • 1,316 Points 1k badge 2x thumb

Posted 9 months ago

  • 1
Photo of Mike Dwyer

Mike Dwyer

  • 3,390 Points 3k badge 2x thumb
One place you might do this is if you are including the button set in a popup called by a row-action. You might use mustache notation to display a field from the table record as part of the button label. For example: Button Label: {{Name}}. Unless you set context, the "Name" would always come from the first row in the table.
Photo of Ann Kukich

Ann Kukich

  • 1,316 Points 1k badge 2x thumb
That makes sense, I didn't know that feature was available.  Of course I will have to try it out :)

Thanks Mike
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Generally context is important in situations where you could have multiple instances of the same component on a page.  The popup scenario is one of these. But trickier examples are table drawers and deck cards. 

You might put a buttonset in a card ( in a deck),  so it shows on every card.  In this case you would want to use context so that the button interacted with the records in the specific card, and not with all the rows in the model, or the first row in the model.  

Enter context.... 
Photo of Ann Kukich

Ann Kukich

  • 1,316 Points 1k badge 2x thumb
Thanks for the information.   I have been experiencing problems with field render settings disappearing in popups on a page.   I believe the problem may be with context(s).

Ann
Photo of Ann Kukich

Ann Kukich

  • 1,316 Points 1k badge 2x thumb
Have found that context was indeed my problem. Had multiple models on same sObject. I set contexts appropriately and also implemented page includes for tab and chart components. Cut xml lines from 9000 to 5000 and page runs super fast. Skuid is pretty awesome!