Forum Discussion

AmberFox's avatar
AmberFox
Qrew Member
9 months ago

Formula Query RecordsList Error

I'm getting a "variable declaration must be followed by a type" error and I cannot figure out how to fix it. This code was set up by a QB tech during a custom integration but I no longer have access to their assistance. Can anyone help me figure this one out? 
FORMULA:
//collect a list of records from the bridge table for the assignee
//that conflict with the chosen assignment's date
var RecordsList Conflicts = GetRecords(
//get records where the chosen staff is the same as the bridge record's related staff
//38 = Assignment-Related Staff, 39 = Request - Related Staff
"({38.EX."&[Related Staff]&"}OR{39.EX."&[Related Staff]&"})"
&
//filter the records where the Beginning Date on or before this record's Load Out Date (users ToDate func to convert to date only to accommodate date/time type field)
//41 = Beginning Date
"AND{41.OBF."& [Event - Load Out])&"}"
&
//filter the records where the Beginning Date is on or after this records Load In Date
//42 = Ending Date
"AND{42.OAF."& [Event - Load In]&"}"
&
//get only conflicting records that are not itself, after assignment has been assigned
//9 = related assignment
If([Record ID#] != 0,
"AND{9.XEX."&[Record ID#]&"}")
; [_DBID_BRIDGE]
);
 
var text conflictsCleaned = SearchAndReplace(ToText(GetFieldValues($conflicts, 40)), ";", "");
 
"<table border=1 cellspacing=0 cellpadding=5 >"
&"<tr><th>Event Name</th><th>Type</th><th>Beginning Date</th><th>Ending Date</th></tr>"
&
$conflictsCleaned
& "</table>"


------------------------------
Amber Fox
------------------------------

1 Reply

  • It should be recordlist instead of recordslist. Remove the s in records and you should be good to go.



    ------------------------------
    Chayce Duncan
    ------------------------------