• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

    🚀 Exclusive Lifetime Offers 🚀

    We invite you to take advantage of our special one-time payment plans, providing lifetime access to select applications:

    • 🔥 Pabbly Connect — Lifetime Access for $249View Offer
    • 🔥 Pabbly Subscription Billing — Lifetime Access for $249View Offer
    • 🔥 Pabbly Chatflow — Lifetime Access for $249View Offer

    Make a one-time investment and enjoy the advantages of robust business management tools for years to come.

Workflow not routing based on formula

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.
 

ArshilAhmad

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


Python:
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())
 
Please try add this Python code to your workflow and see if that gives you the desired result.


Python:
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
 

ArshilAhmad

Moderator
Staff member
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.

 
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.

that code did not work. i tried chat gpt for alternat codes and none of them worked.
 
Top