Discussions

 View Only
  • 1.  Select query equivalent

    Posted 08-09-2018 14:54
    I'm very much used to SQL, Quickbase is very new to me.

    I want to look up a value from a table based on a string, this is for a mailing house and I build the string up depending on the post carrier, weight of item, quantity etc.  I'd like to create a query or formula that can do this from a field formula.

    Before I would just: 
    SELECT cost FROM data_tbl where product = 'MyString'

    I'm baffled by what I'm seeing with Quickbase. 


  • 2.  RE: Select query equivalent

     
    Posted 08-09-2018 15:08
    The usual method in QuickBase for this type of thing would be to create a formula-text field that builds your string. Then use that field to filter a report on the table. There are API methods available to do this type of thing also depending on the desired output/use of the data in the query.

    Hope this helps,

    ~Rob


  • 3.  RE: Select query equivalent

    Posted 08-09-2018 15:17
    Thanks, I have the string built and held in a field, I then want to use this field value in a look up table, I want to retrieve one value back, I was hoping to steal some code and adapt it, I was working with some thing like this. 

    <query>{'16'.CT.[ProductCode]}<query>

    This is my 2nd day with the product so still a novice and there doesn't appear to be a manual.  I can't see where I define what table I want to be queried.


  • 4.  RE: Select query equivalent

     
    Posted 08-09-2018 15:22
    That syntax is used when calling an API. Are you calling the �API_DoQuery� method, or trying to work from within a report on a table?


  • 5.  RE: Select query equivalent

     
    Posted 08-09-2018 15:25
    https://help.quickbase.com/api-guide/... <- here are the api docs. They will be helpful to you one day, even if that isn�t the case for this topic.


  • 6.  RE: Select query equivalent

    Posted 08-09-2018 15:26
    I'm not calling anything, I've just found a video on YouTube explaining some of this so I'm catching up, if there are any code examples you could point me to I can try and amend these.


  • 7.  RE: Select query equivalent

     
    Posted 08-09-2018 15:31
    You shouldn�t need any code. Just go to the table in QuicBase, create a report, and insert your filter criteria there. I�m sorry I can�t offer screenshots right now. I�m on my mobile device. Just trying to help point you in the right direction.


  • 8.  RE: Select query equivalent

     
    Posted 08-09-2018 15:33
    There will be a filter section when customizing the report. In that section, set cost field equal to your formula field. The report will then display only those records.


  • 9.  RE: Select query equivalent

    Posted 08-09-2018 15:34
    Thank you! 


  • 10.  RE: Select query equivalent

     
    Posted 08-09-2018 15:35
    I�ll try to offer more later when I�m at a machine if no one else has chimed in. Let me know if you figure it out.

    Thanks!