I'm looking to use javascript and CAML to place a value on a SharePoint page. I need to find the current On-Call person based on the start and end date of a list item, and the next on-call person based on the same criteria. I've done this in PowerApps with a lookup() and datadiff(), but I'm having trouble converting this to CAML.
PowerApps query:
LookUp('PowerAppConnection', And(DateDiff(DateAdd(Now(),-Weekday(Now(),11)),StartDate)>0,DateDiff(DateAdd(Now(),7-Weekday(Now(),11)),StartDate)<=0)).AssignedTo_Text