I have designed t his procedure to give the proper response when a specific we request code is given. As you can see it is very long winded, What would be a more efficient way to make this work with less blocks? This procedure works, I would jsut like to learn how it can be made more efficient.
You can try Dictionary block, add all the condions in single global variable as i did and use only one get value for the key… Remaining things blocks will do
In the place of 400 you can use get response code… simple
Exactly like this, as @Still-learning said
Yet Less Efficient but, My Try:
you can try this also… I believe the response code certainly will exists in this list, This also will give you reduced blocks but must be very cautious
In the place of number you could use get response code
There are multiple ways is there(once you started to involve much more with kodular, just kidding) but it is our choice to use for our convenient… Learning is always better than else…
Have you tried my approach with if key is in dictionary ?
Thank You All for the different approaches. @dora_paz & @Still-learning I like this dictionary approach, its elegant and using the global variable method I can reuse them in other parts of the program and or projects.
Ok so taking what I learned yesterday, I designed these blocks. It functions, meaning it will send the http Request, however the response doesn’t show up. Its not immediately obvious to me what I’ve done wrong. I also couldn’t locate the “Do it results”
Sorry, make changes like this…
misplaced the blocks…
your response code is the key of the dictionary… and global alert is the dictionary… pls refer the @dora_paz orry, make changes like this…
misplaced the blocks…
your response code is the key of the dictionary… and global alert is the dictionary… pls refer the @ post
This is how everything currently looks:
Everything works except the notify part.
Instead of procedure if you notifier, What you are getting? an proper response code as given in the dictionary keys?
OK some progress,
Running removing the procedure and running this give s a Not found when it should be 200 for OK. The http request is successful but the “global alerts” dictionary never gets checked.
Got your problem…
Me too Had the same issue early… Do one thing… In all the keys just add a letter like
now in the procedure just use join block and it will become as Aresponse code…
I hope surely it will trigger…
The reason is, if the alert is number then notifier pop up an error or nothing… dont know whether it a bug or not…
I understand the first part Adding the A, I am just unclear where to add the Join block.
This definitely worked! I guess there is a Bug or it might be a feature.
Thank you for helping me troubleshoot! I know more than I did 2 yesterday .
Yes, Dear Moderators and @Kodular please see to this point and take into your consideration…
While using web component, notifier does not work with response code (works well with alpha numeric code but doesnot with numeric)… We didnt see such issue earlier. For the last few days only we are experiencing,May be… I thought i was wrong, but after having experience with this user @Chaka_Hamilton , here by i am confirming and lodging this issue. Please review it…
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.