Condition When Invisible

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Condition When Invisible

Post by customaware »

Reverse Logic drives me crazy...

I have two Drop Down Menu Items to Lock or UnLock particular users access to parts of the system.

Firstly, the LoggedinUser must have the Attribute CanLockUnLockSystem set to Yes. If No then neither option will display.
Secondly, If already Locked then only Unlock option should display. If already UnLocked then only Lock should display.

So, I have the following conditions for Condition When Invisible....

Lock:
(LoggedInSystemUser.CanLockUnLockSystem='Yes' AND SystemSettings.SystemIsLocked='Yes') OR LoggedInSystemUser.CanLockUnLockSystem='No'

UnLock:
(LoggedInSystemUser.CanLockUnLockSystem='Yes' AND SystemSettings.SystemIsLocked='No') OR LoggedInSystemUser.CanLockUnLockSystem='No'

Clearly this logic is not right as both options always display regardless of the condition of SystemSettings.SystemIsLocked.

I have checked and the values for LoggedInSystemUser.CanLockUnLockSystem are correct.

I have tried the reverse and wrapping in a NOT. Still no joy.

What am I missing....?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Condition When Invisible

Post by Jaymer »

That new stuff Vlad added does not redraw dynamically.
Only when the form is drawn.
FYI
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Condition When Invisible

Post by customaware »

I know Jaymer.

Even after refreshing / reloading the page the logic still does not work.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Condition When Invisible

Post by Jaymer »

Looks like a bug to me then.
Try those same conditions on two separators and see if they draw correctly.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Re: Condition When Invisible

Post by Rennur »

Code: Select all

I have checked and the values for LoggedInSystemUser.CanLockUnLockSystem are correct.
So no null values for either CanLockUnLockSystem and SystemIsLocked attributes in the database records?
customaware
Posts: 2391
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: Condition When Invisible

Post by customaware »

No Rennur,

I am conscious of using ='No' rather than <>'Yes' and usually ALWAYS use <>'Yes'. But I suspected the boolean logic was not treating that correctly either.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
Post Reply