Discussions

 View Only
  • 1.  GetFieldValues Query Question

    Posted 02-05-2023 13:37
    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
    ------------------------------


  • 2.  RE: GetFieldValues Query Question

    Posted 02-05-2023 14:03
    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 





  • 3.  RE: GetFieldValues Query Question

    Posted 02-05-2023 18:21
    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] & "'}";

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


    ------------------------------
    Mark Shnier (Your Quickbase Coach)
    mark.shnier@gmail.com
    ------------------------------



  • 4.  RE: GetFieldValues Query Question

    Posted 02-06-2023 08:35

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

    So in the query it should look like: 

    GetFieldValues(GetRecords("{17.EX.'value'}AND{7.EX.'value'}",[_DBID_PRICE_HISTORY]),19)



    ------------------------------
    Dwight Munson
    ------------------------------



  • 5.  RE: GetFieldValues Query Question

    Posted 02-06-2023 10:18
    Thank you all for your help ... using AND vs and and going with the variable approach gave results.

    ------------------------------
    George Bramhall
    ------------------------------