Calendar event creation not respecting model conditions.

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
Condition:

Popup on calendar click for event creation:


Why is the Name field not set to "Blocked" by the condition?
Photo of Matt Sones

Matt Sones, Champion

  • 31,530 Points 20k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Zach McElrath

Zach McElrath, Employee

  • 49,242 Points 20k badge 2x thumb
Because Skuid is currently setting the "Name" field value for new Events to "New Event", regardless of whether the new Event already has a default value populated via a mechanism such as Model Conditions, as you are doing.

So, we'll get this changed in the next update of Banzai.
Photo of Matt Sones

Matt Sones, Champion

  • 31,530 Points 20k badge 2x thumb
Thanks!
Photo of Matt Sones

Matt Sones, Champion

  • 31,530 Points 20k badge 2x thumb
A workaround, in the mean time:

'renderBlockName': function (field, value) {
if (value !== 'Blocked') {
value = 'Blocked'
field.model.updateRow(field.row, field.id, value, {initiatorId: field._GUID});
}
skuid.ui.fieldRenderers[field.metadata.displaytype][field.mode](field, value);
}
(Edited)