Forum Discussion

GeorgeBramhall2's avatar
Qrew Cadet
2 years ago

GetFieldValues Query Question

GetFieldValues(GetRecords("{17.EX.'" & [Consignee - Related Consumer] & "'}and{7.EX.'" & [Load # - Description] & "'}",[_DBID_PRICE_HISTORY]),19)

Can anyone tell me what is wrong with this query, I am not getting any results and I know that there are some.

In addition when if I query for either of the 2 filters individually I do get results, eg:
GetFieldValues(GetRecords("{17.EX.'" & [Consignee - Related Consumer] & "'}",[_DBID_PRICE_HISTORY]),19)

George Bramhall

4 Replies

  • Thank you all for your help ... using AND vs and and going with the variable approach gave results.

    George Bramhall
  • I have a question. Do you have records where the two fields match? because you use an AND statement. 

     Consulting them separately is not a good test. 

     A=XYZ and B=FGH , do you have record with the two conditions ?

    Marcelo Benavides Torres 

    • MarkShnier__You's avatar
      Icon for Qrew Legend rankQrew Legend
      I believe that the the "and" is incorrect.  I believe it is case sensitive and also I think it needs spaces.

      Try this standardized syntax.  The syntax is so difficult and the formula editor does not help much for Formula Queries, I try to keep mine very standard like this.

      var text QUERY =
      "{17.EX.'" & [Consignee - Related Consumer] & "'}"
      & " AND "
      & "{7.EX.'" & [Load # - Description] & "'}";

      GetRecords($QUERY, [_DBID_PRICE_HISTORY]),19)

      Mark Shnier (Your Quickbase Coach)
      • DwightMunson1's avatar
        Qrew Assistant Captain

        No spaces on the AND, it does need to be capitalized though. 

        So in the query it should look like: 


        Dwight Munson