Discussions

 View Only
  • 1.  Using an app variable in webhook

    Posted 12-28-2019 00:43
    Hey all!

    As a programmer, I love it when I can define a constant that I can use everywhere. That way I only change one thing when/if that thing changes.
    App variables are these beautiful constants.

    However, I can not find a way to use app variables in a webhook, which feels like an oversight to me.
    Currently, I am trying to use an app variable in the URL of the webhook. 
    First off, it's a little annoying because the webhook URL must start with https://, second, it's annoying because I can't use app variables here. As far as I know.

    I tried creating a field that was just the app constant, because I do have access to fields and their values in a webhook, but it altered the slashes and turned them into % things that the URL didn't know how to handle. 

    So, how can I use an app variable in a webhook?
    Or is there some other way to have a constant? It would be even better actually if I could share it between apps. =)

    Thanks for the help!

    ------------------------------
    - Sterling Long!
    ------------------------------


  • 2.  RE: Using an app variable in webhook

    Posted 12-28-2019 08:30
    Edited by Mark Shnier (Your Quickbase Coach) 12-28-2019 08:49
    I don't know if you can use an App Variable in a Webhook.  But I never use them because only the admin has access to them both for viewing and for editing and  since they are only in text format, when you go to use them you have to say ToNumber([my app variable]).  I also think that they are a bit obscure, in that if someone else ends up having to support the app it may confuse them at first as to how that "field" is working when it's not in the field list. 

    So so what I tend to do is to create a Global Variables table with a single record.  It will be [Record ID#] of 1.

    Then make a reference field on any table where you need to look up values from the Global parameters and make a reference  formula field with a formula of 1.


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Using an app variable in webhook

    Posted 12-28-2019 10:18
    Mark,

    I like that idea.  


    ------------------------------
    Don Larson
    Paasporter
    Westlake OH
    ------------------------------



  • 4.  RE: Using an app variable in webhook

    Posted 12-28-2019 19:36
    Is it possible to have multiple variables in that Global Variables table? From your description it doesn't sound like I can, due to it being a relation.
    So, I'm assuming 1 table per constant. Is that correct?

    ------------------------------
    - Sterling Long!
    ------------------------------



  • 5.  RE: Using an app variable in webhook

    Posted 12-28-2019 20:22
    no no no no no

    You can have essentially an infinite # of fields in a table.  So think 1 record with say 20 fields.  Then look up any or all of those 20 fields specifically down to any child tables where are needed.​

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 6.  RE: Using an app variable in webhook

    Posted 12-28-2019 20:26
    Why didn't I think of that. Thank you very much Mark!

    As a further question, I have implemented this idea, however I still have one more issue.

    For some reason, the Webhook encodes the text of my URL when I put it in as a field in the endpoint URL. Do you have any idea how to make it not do this? Or any idea how to avoid it? My searches have been in vain thus far. 

    Thanks for your help!

    ------------------------------
    - Sterling Long!
    ------------------------------



  • 7.  RE: Using an app variable in webhook

    Posted 12-28-2019 20:29
    I kind of muddle my way through webhooks to external non Quick Base sites, so I can't be of much help.  I think that you will need to post a new question along with a screen shot or preferably the text from your webhook (so that it is copy / paste - able).

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------