Forum Discussion
MatthewThornton
3 years agoQrew Member
Hi Razi,
Thanks for the assistance! This formula didn't quite work for me. After inputting my DBid and field ids, I was given an error message saying that the variable declaration was expecting text but found recordlist. I did some digging around and couldn't seem to find a way to adjust the recordlist to text so it could then be used in the supplemental if statement. Any ideas what to try next?
var text recs=GetRecords("{'8'.OAF.'"&[Start Date and Time of Activity]&"'}AND{'8'.OBF.'"&[End Date and Time of Activity]&"'}", "aaaaaa");
if($recs="", true, false)
Thanks!
-Matt
------------------------------
Matthew Thornton
------------------------------
RaziD_
3 years agoQrew Cadet
Hi Matthew;
You can add ToText() function to formula like below:
var text recs=ToText(GetRecords("{'8'.OAF.'"&[Start Date and Time of Activity]&"'}AND{'8'.OBF.'"&[End Date and Time of Activity]&"'}", "aaaaaa"));
if($recs="", true, false)
Or you can do:
var number recs=Size(GetRecords("{'8'.OAF.'"&[Start Date and Time of Activity]&"'}AND{'8'.OBF.'"&[End Date and Time of Activity]&"'}", "aaaaaa"));
if($recs>0, false, true)
------------------------------
Razi D.
WEP Forms
http://www.destatechs.com
------------------------------
You can add ToText() function to formula like below:
var text recs=ToText(GetRecords("{'8'.OAF.'"&[Start Date and Time of Activity]&"'}AND{'8'.OBF.'"&[End Date and Time of Activity]&"'}", "aaaaaa"));
if($recs="", true, false)
Or you can do:
var number recs=Size(GetRecords("{'8'.OAF.'"&[Start Date and Time of Activity]&"'}AND{'8'.OBF.'"&[End Date and Time of Activity]&"'}", "aaaaaa"));
if($recs>0, false, true)
------------------------------
Razi D.
WEP Forms
http://www.destatechs.com
------------------------------