How to pass variable in a delay activity as delay

Hello ,

i am getting the delay from the config of string type and i need to use that in delay activity.

suppose delay string of value 3 I am getting from config.

Please help

1 Like

@Karan28

Try like this:

    CInt(Config("delayVariableName").Tostring)

Where Config variable is if type dictionary.

1 Like

Delay will be usually mentioned as 00:00:00 like hh:mm:ss

So if we are getting this as a stringlike “00:00:10” then in the delay property mention as
TimeSpan.Parse(config(“yourdelaykeyname”).ToString)
Or
If we are trying to mention that delay in any of the selector acceding activities with properties like Delayafter and DelayBefore which will take milliseconds as input type
So mention like this
Convert.ToInt32(config(“yourdelaykeyname”).ToString)

Where config is a variable of type dictionary

Cheers @Karan28

1 Like

Thankyou so much , it worked

1 Like

Cheers @Karan28

Hello @Palaniyappan , this delay format is nor working

I am taking the delay from config which is like this.
key- delay
value- 00:00:03

but excel config file taking the value like this - 12:00:03 AM

1 Like

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