Page 1 of 1

Multiple Resources

PostPosted: Wed Oct 16, 2019 1:43 pm
by Graham
Hi, long time filemaker developer...first time DayBack integrator :-) Newbie question: I've got a pretty complex list of resources for the calendar project I'm working on...but to take 2 examples: I've got rooms and staff...the values for these are "intermingled" in the resource field in my events table. But I've also got explicit fields for them...so for example, I've got a custom pop-up window for editing events...if someone enters the room, the resource fields auto-enters the room name into the resource field.

This works great, however, say someone moves the event from one room to another within the web viewer, the resource field updates, but the room field does not. Anyone have an easy way of handling that? I could "loop" through the values in the resource field and try to determine is the value is a room, then set it or something, just wondering if there's anything more "elegant."

Graham

Re: Multiple Resources

PostPosted: Wed Oct 16, 2019 1:51 pm
by kcembrey
Hi Graham,

When events are edited on the calendar, the "Submit Event From WebViewer" script is called from the web viewer, which in turn runs the "Create Edit Delete Event" script. This is where a hidden window is opened and the values are actually saved back to the event record. In the section commented "# Resource" near line 184, you could add your own logic to check if the resource value is a room and, if so, update your "Room" field.

I hope that helps!

KC

Re: Multiple Resources

PostPosted: Wed Oct 16, 2019 1:59 pm
by Graham
Super helpful, will give that a shot!