GET default value not seeming to work

Options
Hi!

If I remember correctly, you guys created the GET default value so that--if the pathway didn't exist (because that object didn't have that particular piece of data), we could automatically substitute a new value.[image.png]Unfortunately, it's giving me some trouble in a SPRINTF statement. My test data does not have activity.static_video_chat_url, and it gives me this error:
[image.png]Originally, I thought this error meant I was pulling an array when I needed an object, but after removing every individual piece of data, I was able to determine that this was the trouble maker. No arrays are involved.

Here's the function: https://gomigo.org/admin/workspace/1/function/117

I'll put test data in a comment below.

Comments

  • Erin Wagner
    Options
    Test Data:
    {
      "generate_video_chat_url": false,
      "plan_id": 52,
      "user_ids": [
        303,
        319
      ]
  • Erin Wagner
    Options
    I tried using CONCAT instead of SPRINTF and can see that it didn't input the default value. It's just blank. (But at least it didn't throw an error. I can work with that.)
    [image.png][image.png]
  • Michael Udinski
    Michael Udinski Administrator

    ADMIN

    Options
    seems like sprintf should work... we'll take a closer look to see what we can find
  • Sean Montgomery
    Sean Montgomery Administrator

    ADMIN

    Options
     the issue is that your static_video_chat_url does exist, it just is null - rather than not existing at all. So it is using the null value.

    For this example, you could use the filter "first_notnull" and pass in an empty string for the 2nd value.

    We also will update the sprintf filter to automatically turn null values into empty strings because that is a bit annoying.
  • Erin Wagner
    Options
      Thanks for both the explanation and the feature tweak. Much appreciated.