Hi,
just to let you know , if someone have same issue in the future.
I resolved my problem, with your help and a lot of testing .
1st problem :I wanted to assign a value as last priority in the switch, to do this I put this:
[.....] ,TRUE,0)
But I had to change to this in order for it to work ,
Solving solution : it’s like this now :
[.....] ,IIf(TRUE=TRUE,TRUE,FALSE)=TRUE,0)
I don't understand why because for me the condition must be Boolean, and True is a Boolean value?🤔
at least it works🙂
EDIT : i realized that the last condition(default) can be ommited, so it’s simpler.
2nd problem : each condition, i was trying to put And/Or without good result in the switch, like:
[.....],
(DayOfWeek([PMTran.Date])=0 Or DayOfWeek([PMTran.Date])>5) And [EPEmployee.PR672TITLE_Attributes]='8' And InStr([InventoryItem.InventoryCD],'HTRANS')>0,60
[.....]
Solving solution :
But I had to change to this in order for it to work(added an Nested IIF proposed from @ChandraM and a comparison) , it’s like this now :
[.....]
,IIf((DayOfWeek([PMTran.Date])=0 Or DayOfWeek([PMTran.Date])>5) And [EPEmployee.PR672TITLE_Attributes]='8' And InStr([InventoryItem.InventoryCD],'HTRANS')>0,TRUE,FALSE)=TRUE,60,
[.....]
like for the first one, Idon't understand why because for me the first attempt seem to be Boolean?
at least it works🙂
Thanks