Workflow not routing based on formula

Status: Open · Asked by mgecustomprints79 on · 0 views

mgecustomprints79 — Question ·

This is the formula I am using on pabbly to route the tasks for my am and pm shifts when trello cards are created. The am shift cards are beign created but not the Pm shift IF(AND(TIMEVALUE("2. Result 4 : 08:17:39")>=TIME(14,0,0), TIMEVALUE("2. Result 4 : 08:17:39")<=TIME(20,0,0)), 2, 1). I also tried this
IF(AND(TIMEVALUE({{2.Result4}}) >= TIME(14,0,0), TIMEVALUE({{2.Result4}}) <= TIME(20,0,0)), 2, 1) and only the cards for my AM shifts are beign created. Can I get some help with this please.

Arshil Ahmad — Reply ·

Hi @mgecustomprints79,

Could you please share the Workflow URL where you have this concern?

Arshil Ahmad — Reply ·

Please try add this Python code to your workflow and see if that gives you the desired result.

https://connect.pabbly.com/workflow/share/WhJYalcACWoDSQRuVQpTdFxICw8BWAZmU0oIGldYVCxbFQlcVhdcNlsXUzkATwdmVh8HbVEOAWQPGwoOVwEAcwQeAwEAAwV_BksBelQVDD9aBFhwVzY#

from datetime import datetime, time

def get_value_based_on_time():
# Get the current time
current_time = datetime.now().time()

# Define the time range
start_time = time(15, 0) # 15:00
end_time = time(20, 0) # 20:00

# Check if current time is within the range
if start_time <= current_time <= end_time:
return 2
else:
return 1

# Example usage
print(get_value_based_on_time())

mgecustomprints79 — Reply ·
Please try add this Python code to your workflow and see if that gives you the desired result.

https://connect.pabbly.com/workflow/share/WhJYalcACWoDSQRuVQpTdFxICw8BWAZmU0oIGldYVCxbFQlcVhdcNlsXUzkATwdmVh8HbVEOAWQPGwoOVwEAcwQeAwEAAwV_BksBelQVDD9aBFhwVzY#

from datetime import datetime, time

def get_value_based_on_time():
# Get the current time
current_time = datetime.now().time()

# Define the time range
start_time = time(15, 0) # 15:00
end_time = time(20, 0) # 20:00

# Check if current time is within the range
if start_time <= current_time <= end_time:
return 2
else:
return 1

# Example usage
print(get_value_based_on_time())


Am I replacing the equation I have with this info and what part of the workflow would I be adding this to? 1
Arshil Ahmad — Reply ·

You need to replace the 'Number Formatter: Spreadsheet Formulas' action step in your workflow with the Code (Pabbly) module. In this module, you can execute the code shared above to get the desired result — it will return 2 if the time is between 15:00 and 20:00, otherwise it will return 1.

youtube.com/watch?v=iNVjyBfwqno

mgecustomprints79 — Reply ·
You need to replace the 'Number Formatter: Spreadsheet Formulas' action step in your workflow with the Code (Pabbly) module. In this module, you can execute the code shared above to get the desired result — it will return 2 if the time is between 15:00 and 20:00, otherwise it will return 1.

youtube.com/watch?v=iNVjyBfwqno


that code did not work. i tried chat gpt for alternat codes and none of them worked.
Preeti Paryani — Reply ·

Hello @mgecustomprints79,

Our team has replied to your query via email. Please refer to the following ticket ID to view the same: #134820.

mgecustomprints79 — Reply ·
Hello @mgecustomprints79,

Our team has replied to your query via email. Please refer to the following ticket ID to view the same: #134820.


None of the fixes worked. I ended up figuring out a workaround
Arshil Ahmad — Reply ·

Thank you for the update. We are glad you were able to find a workaround.

Back to all forum threads · Log in to reply