Skip to main content

I have a scheduling base for Volunteers helping at Non-Profits. I am wondering if it is possible accomplish these with a formula?


I have attached a generic base to give you an idea of what i am looking for. I have entered the answers into the fields as an Example via text.


#1. Volunteering with -

If multiple volunteers are on the (same date, same location, same start time, same stop time), I would like column " :raising_hand_man: Volunteering with :raising_hand_man: " to show the names of each volunteer on the same detail.


#2. Double Booked -

If a volunteer is signed up for multiple details the same day I would like a column “ 👀 Double Booked/Overlapping Shifts 👀 ”, if they are double booked or have overlapping shifts.


#3. Relieving/Relieved by -

I would like two columns " 🤝 Relieving Volunteer 🤝 " & " 🤝 Relieved By Volunteer 🤝 " to list the names of those volunteers if applicable (ie. If one shift ends and another one starts. Shift one is 8:00am-10:00am, shift two is 10:00am-2:00pm, shift three is 2:00pm-4:00pm, etc.)


Thanks for any help you can provide!


Ok, I just found a little hiccup in the code and am having a tough time finding a solution.


For my “sameShiftRecordsexact” it is pulling in data if the chosen shift is within another shift and not just exactly the same.


I thought this part



    ((triggerValues.start <= x.start && triggerValues.stop >= x.stop)) && 


would just need



==



instead of



<=



but that didn’t work 😦 Any help is greatly appreciated 🙂


Ok, I just found a little hiccup in the code and am having a tough time finding a solution.


For my “sameShiftRecordsexact” it is pulling in data if the chosen shift is within another shift and not just exactly the same.


I thought this part



    ((triggerValues.start <= x.start && triggerValues.stop >= x.stop)) && 


would just need



==



instead of



<=



but that didn’t work 😦 Any help is greatly appreciated 🙂


Did you set both <= and >= to ==?


Did you set both <= and >= to ==?


Yeah, when I change them both to == it is not recognizing anything for the “sameShiftRecordsExact”.



((triggerValues.start == x.start && triggerValues.stop == x.stop)) &&



Yeah, when I change them both to == it is not recognizing anything for the “sameShiftRecordsExact”.



((triggerValues.start == x.start && triggerValues.stop == x.stop)) &&



Disregard. I finally figured it out 🙂 Had to change this block of code to with the “toISOString”


Thanks again.



const sameShiftRecordsExact = shiftRecords.filter(x => {


return (x.start.toISOString() == triggerValues.start.toISOString()&&

(x.stop.toISOString() == triggerValues.stop.toISOString()&&

(x.location == triggerValues.location))

)

})



Reply