set defualts of new row in table

  • 1
  • Question
  • Updated 4 months ago
  • Answered
Sorry for the noob question,  
I am trying to set the default of a date field when a user clicks add new row + in a table.   

Is there a simple way to set the default in skuid or do I need to set the default in salesforce?
Photo of Ambrose Alward

Ambrose Alward

  • 300 Points 250 badge 2x thumb

Posted 4 months ago

  • 1
Photo of Toms Vineeth John

Toms Vineeth John

  • 450 Points 250 badge 2x thumb
You can use Model Action in the Model for that. The trigger will be, whenever a new row is created then set the action as Update a field on the row(s) the 'Date field' as Today.  Hope that helps.
Photo of Craig Rosenbaum

Craig Rosenbaum

  • 4,776 Points 4k badge 2x thumb
You can also remove the ability to inline add records and use a global action on the table. Have this action create a new row and set default fields from there. 
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,262 Points 20k badge 2x thumb
Craig's idea is the most straightforward --- just add a Global Action of type "Create new row", and then you can specify default values for specific fields on the new row. You can specify default values for Date / Datetime values using special values such as "Today", "Tomorrow", "Yesterday", etc., or pull the value from a field on another Model, or specify a specific Date.
Photo of Ambrose Alward

Ambrose Alward

  • 300 Points 250 badge 2x thumb
Thanks!