Missing notification output

Continuing the discussion from Pass data throught a button to SQL Table:

I Steve, could you help me on this flow?
I'm using this flow, but I have a problem. When I enter in the tab (by http://127.0.0.1:1880/ui) for the first time, if I don't fill all the fields I don't get the Notification and data are stored in the SQL table (I added a sql node).
If I tried to fill the field and cancel it, the notification appears.
If I store an instrument filling all the fields, for the second instrument I have correctly the notification if I don't fill one field.

Do you have idea how to solve this?

I add the output of my debug:

The field Classif is not empty, but contains 'xxx6', but in the debug I see empty.
In any case, the problem is that in case of empty field I put a notification node, but it is not shown and data are stored.

How is the Classif debug node setup? Please open it and show us.

So the reason you get a value under the debug node is because msg.TextInput has something in it whereas msg.payload is an empty array.

Where you intend to use this msg, either use msg.TextInput or use a change node to move msg.TextInput to msg.payload

Ok thanks.

If a look at you flow, and I fill the TIPOLOGIA with one element of the dropdown menu, I get always the same notification 'Classification is empty' (even if it is filled I mean).
And if I fill all the fields and than I delate User input (like not filled), I don't get any Error message. I would expect 'User Input is empty'.

Could you check and tell me if I'm doing somenthing wrong?

Check what?

You have not posted enough info / flow!

When I opened this post, I shared the link of a previous post (already closed) where you posted a flow (see the post starting with Ah apologies end then a flow).

I refer to that flow!

Thanks

Ok, so the demo flow I posted was supposed to get you going & get you started - it was never a complete solution.

Your issues are easy enough to figure out with a hand full of debug nodes and a little bit playing with the nodes. Did you watch the help videos i posted a link to?.

In simple terms, this happens because the demo flow check the input value is null. It seems node-red switch node doesnt consider empty string to be null. So if you change that to is empty then it works as expected.

image

Before to ask you, I aready changed is null with is empty, but I had the problem with first injection data.

I need to put both to solve.

Thanks

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.