AnsweredAssumed Answered

Portal filter: can if be used in the calculation ?

Question asked by planteg on Sep 2, 2015
Latest reply on Sep 3, 2015 by Extensitech

Hi,

 

on a layout I have a portal for which I have set a dynamic filter, that is I used criteria stored in Global Fields. That works fine. But I face the situation where I would need a very different filter. So I thought that I could use and If in the calculation:

 

If ( Left (Employes_4::z_Titre; 1 ) = "P";

( TimeEntry_4::EntryDate  ≥  TimeEntry_4::z_F_DateDU)  and (TimeEntry_4::EntryDate  ≤   TimeEntry_4::z_F_DateAU) and  ( IsEmpty ( TimeEntry_4::EntryPayed ) or (  Employes_4::z_InclurePayer_Val  = "Oui" ) ) ;

( TimeEntry_4::EntryPayedDate = TimeEntry_4::z_DatePayee )

)

 

To my great dismay, the filter for the false part does not work . For sure, the bug may sit on my chair, but I was wondering in first place it's ok to use an If in this condition.

 

Ok, there were a couple of errors in my scripts. After they were corrected I found out that the false part of the If worked, but can't tell why. The true part of the calculation seems to works all the time, but the false part only once in a while...

 

Thanks

 

Gilles Plante

Outcomes