App Flow Parameters "undefined" causing an error

I’m converting some server connects that I had on a page to an app flow. I’m getting an “A non-numeric value encountered” error on the scVendorItems SC. Judging by the line of code in the error, I’m pretty sure it’s because of the sort, offset etc params.

The scVendor that has defined params works fine.


The scVendorItems with query.param_name(s) placeholders does not.




You can see it shows param_name=undefined for the various params in the headers which I’m sure is the issue. I tried doing (query.param_name?query.param_name:’’) but that didn’t work. Plus, I would think this should be unnecessary in the first place.

Is this a bug, perhaps?

Thanks in advance,
Twitch

You can use the default formatter for a default value. But you are right that it should not be needed if a parameter is optional and it should not add it when undefined or null. Will see if I can improve that in the Server Connect action.

You can test the following update, I’ve updated the serverconnect flow action to ignore parameters that are null or undefined.

dmxAppConnect.zip (26.6 KB)

@Patrick, thank you, I’ll test if shortly and let you know. I had taken off the flow so I need to add it back.

@Patrick looks like that fixed it my friend. Thank you!

-Twitch

Fixed in Wappler 5.2.6

This topic was automatically closed after 32 hours. New replies are no longer allowed.