Set values based on conditions

Hi, i want to set a value based on conditions.

So let say i get the day name from the system.

I want to do something like if the day is sunday return me 222
If the day is monday return 8822
if the day if friday return 981

Is that something that allow me to simply do that with one tool?
At the moment i can do that with replace but it require me to create 7 steps to do it

Use Code piece then press on ASK Ai :smiley: and describe what you want.

It works great for such use cases, let me know how it goes!

Thanks a lot, i was able to work it out.

It didn’t worked 100% from the Ask AI but it gave me the starting point i was able to use and i continued the code with chat GPT.

The reason i move to chat GPT was because i wasn’t able to alter the code from your box but it’s a great idea and i was able to get what i wanted.

Oh i see now there is the option to adjust it.
This is simply great and made the automation proccess much better

Hi @FOXKILL_FOXKILL

Nice, I would love to hear about the experience mainly to know how to improve, the more describe the better :smiley:

It was great, i mean normally i would need to use 7 tasks with replace to get the result of one and i was able to get the right code.

I do think maybe the option to alter the code need to stand out a bit more because i missed it at the first time.

I am a programmer and i use chatGTP a lot so maybe it’s a bit easier for me compare to someone without experience but i liked that option a lot.

Hi @FOXKILL_FOXKILL,

What exactly do you mean by edit the code? Which UI didn’t you notice is it the reiterate prompt box?

Any suggestion what would make it stand out?

Hi, what i meant is that i created the code the first time and then the code didn’t worked and i needed to adjest it.

It seems like i didn’t saw the request adjustment code and moved from there to chatGPT because the code didn’t work.

I am not sure how but maybe if that was more stand out in some way it would have been better.

Another option might be to be able to alter the code from the section that contain the code (below it maybe) so it can be edit after you see if that code work or now

But i am working with most of the automation tool and the ability to add code like this is really great.

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