Discussions

Expand all | Collapse all

Can Webhook Ignore Fields With no Value?

  • 1.  Can Webhook Ignore Fields With no Value?

    Posted 01-03-2020 12:08
    Hello!

    I have a child table with 3 text fields (Audio, Video, and Audio & Video). It has a parent table with 3 text fields (Audio, Video, and Audio & Video).

    If a user enters a value into any of the text fields on the child record, I'd like it to update it's matching fields on the parent.  However if one of those fields has no value entered into it, i don't want it to override the existing data on the parent... it should skip the field.

    Can this be done via a webhook? In reality, my table has a ton of fields on it... i realize i could create automatons for each one, but that would take us over the automation threshold. 

    Thanks in advance!

    ------------------------------
    Ringoparr
    ------------------------------


  • 2.  RE: Can Webhook Ignore Fields With no Value?

    Posted 01-03-2020 12:22
    Here's an idea.
    Suppose that there is a field on the parent for Project Date.
    Look that up down to the child.
    Now make a field called [Date to be written on project] (I realize you will have shorter names)

    IF(not IsNull([Child Date Entry]),[Child Date Entry],[Project Date])

    and then write that value to the Project Date field in he webhook.  So while there is not logic to avoid clobbering the Project Date with a block, if the date entry on the child record was blank, you will re-writing the same [Project Date] original value over again, which means no change.

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



  • 3.  RE: Can Webhook Ignore Fields With no Value?

    Posted 01-03-2020 12:27
    Easy peasy! I'll expose all the fields on the child and work with that logic. Thanks, Mark, you da admin!

    ------------------------------
    Ryan Parr
    ------------------------------



  • 4.  RE: Can Webhook Ignore Fields With no Value?

    Posted 01-03-2020 13:04
    Edited by Ryan Parr 01-03-2020 13:04
    Mark,

    I ran into a formula error when it came to a multi-select text field. Do you have any tips on how to address that field type?

    "Formula error -- Bad or missing arguments in function call

    The types of the arguments or the number of arguments supplied do not meet the requirements of the function IsNull.

    The function is defined to be IsNull (.

    You may need to do one of the following to fix the problem:
    • Choose the right number and type of arguments.
    • Use a type conversion function to convert the arguments you are using to the correct type.
    • Choose a different function.



    ------------------------------
    Ryan Parr
    ------------------------------



  • 5.  RE: Can Webhook Ignore Fields With no Value?

    Posted 01-03-2020 13:08
    np
    IF(Trim(ToText([my multi select field]))="", "This field is blank")

    ie convert to text and then test vs "" which is empty quotes.

    Note that you cannot check IsNull([my text field]) as its documented that the IsNull function does not work for text fields, so you need to test against empty quotes.

    The Trim is just to trim off any extra leading or trailing white space -  ie spaces or other non visible characters.

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



  • 6.  RE: Can Webhook Ignore Fields With no Value?

    Posted 01-03-2020 13:15
    Edited by Ryan Parr 01-03-2020 13:21
    Ahh i see that IsNull isn't working for most of my fields, because they're predominately text fields.... I'll use the Trim function to fix them all.

    Thanks again!
    ------------------------------
    Ryan Parr
    ------------------------------



  • 7.  RE: Can Webhook Ignore Fields With no Value?

    Posted 01-03-2020 13:27
    Yep
    https://login.quickbase.com/db/6ewwzuuj?a=dr&r=n&rl=rx

    Null means that a field's value is undefined. In other words, no one has entered any data in that particular field. It's empty. Its value is null. The result of this function is true if x is null, otherwise false. The argument x may be of any data type (except text or boolean).

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



  • 8.  RE: Can Webhook Ignore Fields With no Value?

    Posted 01-03-2020 13:34
    Edited by Ryan Parr 01-03-2020 13:49
    One more thing... what about checkboxes? Is there anything fancy i should do to address those? They currently return a value of 0 even if checked.

    Here's where I'm at but it's clearly wrong:

    If(Trim(ToText([Custom Promos]))="", (Trim(ToText([Install - Custom Promos]))),(Trim(ToText([Custom Promos]))))

    ------------------------------
    Ryan Parr
    ------------------------------



  • 9.  RE: Can Webhook Ignore Fields With no Value?

    Posted 01-03-2020 14:00
    Well a checkbox field is a problem. Because when a checkbox field is blank that means unchecked but how do you know if the user wants to uncheck the field on the parent record or in fact they didn't enter any value at all.

     If your users really do need to be able to override and uncheck the parent field by entering data on a trial record then I think you'll need to instead you some kind of multiple-choice field where the user is more clearly indicating a choice as opposed to just leaving something blank. 

    The Patent records can still be a checkbox field though.

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