I made a simple flow,
it contains a node function that sets 2 variables to a certain numerical value, then the node function compares the numerical values of the two variables and sets one variable to a certain string of characters based on the result :
And finally a debug node to see the value of the "msg.result" variable, so IF msg.test1>msg.test2 THEN msg.result=More sites than entities, IF msg.test1<msg.test2 THEN msg.result=Less sites than entities
So far, no worries about the flow working as it should, now I want to reproduce this flow but without setting "msg.test1" and "msg.test2" to a value I choose the value of these 2 variables will be decided by a http request
I have tried several methods but without success and I don't understand why it doesn't work, here is the 1st method:
In this flow we have 2 http request nodes that allow me to retrieve information from a web page accessible from my local network. After getting the information from the web page I sort the information with my 2 nodes function
After having sorted this information, I have only one numerical value left in the information received thanks to the https request nodes, so I set my variables to the same value as the numerical values I have left (the msg.test1 variable takes the numerical value from the first http request and the msg.test2 takes that from the second http request)
Once msg.test1 and msg.test2 have a numerical value I compare them using a swicth node
but no matter what the values of msg.test1 and msg.test2 are the result is wrong, for example IF msg.test1=663 and msg.test2=664 I should see that the debug node which is present in the output of the second condition (msg.test1<msg. test2) but yet I see the debug node that is in the output of the second and third condition as if the flow is telling me that msg.test1>msg.test2 and at the same time msg.test1<msg.test2, so I don't understand why, so this was my first method that I can't get to work.
here is the 2nd method:
this method works almost the same as the first one, we make 2 http request to get information from a web page accessible from my local network, I sort this information with the 2 function nodes at the output of the http request nodes, but in addition to sorting the information, the function nodes set directly the variables msg.test1 and msg.test2 without passing by a change node
then to compare the values of msg.test1 and msg.test2 I use another function node, which uses the same function that was functional in my first simple flow
but it doesn't work either my msg.result is "undefined" while msg.test1<msg.test2 and therefore msg.result should be equal to 'Plus dentité que de site !!!'
I think I have put all the necessary information, do not hesitate to ask me for additional information if you need it, thank you in advance