Hi all
This is following on from my previous post and thought I'd start a new one to see if someone knows about the issue i'm experiencing as I need to resolve it by Monday. Currently I have a Switch and I'm trying to also make it recognize the second IF statement in the formula. Currently it only recognizes the first IF statement for both users I'm trying to setup.
So if the first user has value 'DefualtStartTime7am' next to their name then I want to execute the first IF statement, but if the user has value 'DefualtStartTime8am_1' next to their name then I want to execute the second IF statement. Right now it's only detecting the first IF statement for both users in this case.
I have researched what the Switch function does so I thought the below would work. It seems like it can only detect what wUserStart has next to it in the first part of the formula.
With(
{
wUserStart: "DefaultStartTime7am"
},
Switch(
wUserStart,
"DefaultStartTime7am",
If(
Now() > DateTimeValue("7:00 AM"),
Now(),
DateTimeValue("7:00 AM")
),
"DefaultStartTime8am_1",
If(
Now() > DateTimeValue("8:00 AM"),
Now(),
DateTimeValue("8:00 AM")
)
)
),
I have also tried -
With(
{
wUserStart: "DefaultStartTime7am"
wSecondUser: "DefaultStartTime8am_1"
},
Switch(
wUserStart,
"DefaultStartTime7am",
If(
Now() > DateTimeValue("7:00 AM"),
Now(),
DateTimeValue("7:00 AM")
),
wSecondUser,
"DefaultStartTime8am_1",
If(
Now() > DateTimeValue("8:00 AM"),
Now(),
DateTimeValue("8:00 AM")
)
)
),
But no luck with that one either.
I have a feeling it has something to do with the syntax that I cant figure out.
Thanks for your generous help everyone.