Referencing Calendar Component Record

Hello Skuid Community!

I have a calendar component on my Skuid Page, and I was hoping to provide the ability to create a new record based on the values of the particular record a user is interacting with in the calendar modal. However, I’m struggling to figure out how to give the page this context - it just defaults to referencing the first row of the model instead of the row being displayed in the modal.

I do have an update action on the record shown in the modal that works well and respects the context, but I lose that context when I try to reference that model for a value in the new record:

What seems strange is that my modal has three components, all of which have the same context parameters - however, the button is the only one that defaults to using the first row of the model rather than respecting the context:

Any help on how to add the context, or build another model that can reflect this record ID and be used to create the new record would be awesome!

Thanks in advance Skuid Community!

Not sure I fully understand your setup - but the “Create row” action raises a red flag. That action “captures context” - so any subsequent action that attempts to use a “row based” merge will be sourced from the values in the new row.

This is why the create row action has subactions to pre-populate data. This allows you to grab values from the existing context row and put them into the new row before the context for the action sequence is swapped over to the new created row. It would also explain why the form and table components seem to have the correct context - but the button loses its context (if I’m understanding your set up correctly)

We have ideas about making this clearer in the builder - and recognize this is confusing.

I hope this helps

Hey Rob! I worked with the support team on this item and discovered that although the calendar component keeps context on certain actions, like clicks, it does not retain context for the ‘Create row’ action.

I ultimately used a filter for ID, and used the on-click actions to set this filter, then the after-close actions on the modal to deactivate this filter and requery the wider data set. This method allowed me to reference the target record without setting context.



Yup - that is correct. The “Create Row” action moves context to the new row created, instead of the row that was availble previously. Its one of the most tricky things in Skuid…