BUG or Limitation- READ PROTECT not hiding Reference

If you think that something doesn't work in Aware IM post your message here
Post Reply
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

BUG or Limitation- READ PROTECT not hiding Reference

Post by weblike »

Hi,

I use build 2226 and wanted to hide a reference on the form if other attribute is defined to 'No'.

I used READ PROTECT, bt it doesn't work.

Attached is the CRM sample app.

How to reproduce the problem:
1. Login as admin
2. Go to Customers Query
3. Edit a customer-> Go to "Communication" tab in the form
4. Check/uncheck the "Communication Show" checkbox

It doesn't work.

Thx,
Attachments
READ_PROTECT_reference_not_working_01.bsv.zip
(232.6 KiB) Downloaded 642 times
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by BenHayat »

I had used this feature in V7 and used to work.
But I did not use a checkbox to turn on/off. It might be a problem with Checkbox event handler in Aware and nor READ PROTECT.
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by aware_support »

This has always been a limitation - reference grids cannot be shown/hidden dynamically. Change the checkbox to save the form when it is ticked/unticked, rather than making the rule dynamic.
Aware IM Support Team
customaware
Posts: 2401
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by customaware »

I have just bumped into this and for some reason cannot get any Reference attribute control to hide either dynamically or statically.

I have the Drop Down that sets the condition to Save when changed but no luck

One of the controls is a Swap Select and can not make it hide under any circumstances. :-(

Any ideas?
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
customaware
Posts: 2401
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by customaware »

Ok.... Some interesting discoveries.....

If I have this....

If RemunerationTemplateComponent.ComponentType<>'A + B' OR
RemunerationTemplateComponent.ComponentType<>'A - B'
RemunerationTemplateComponent.ComponentType<>'A X B' OR
RemunerationTemplateComponent.ComponentType='A / B' OR Then
READ PROTECT RemunerationTemplateComponent.OperandA FROM ALL EXCEPT System
READ PROTECT RemunerationTemplateComponent.OperandB FROM ALL EXCEPT System

It does not work.

However, if I switch it around to test when equality exists rather than when it doesn't, like below.... It works.

If RemunerationTemplateComponent.ComponentType='COUNT' OR
RemunerationTemplateComponent.ComponentType='SUM' OR
RemunerationTemplateComponent.ComponentType='VALUE' OR
RemunerationTemplateComponent.ComponentType='COMMENT' OR
RemunerationTemplateComponent.ComponentType='PERCENTAGE' Then
READ PROTECT RemunerationTemplateComponent.OperandA FROM ALL EXCEPT System
READ PROTECT RemunerationTemplateComponent.OperandB FROM ALL EXCEPT System

Also, if I use a Multi-Select Drop Down rather than a Swap Select, then the READ PROTECT Rule works.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by ACDC »

When hiding references using READ PROTECT, a good work- around is to place the reference in a separator and then use the Applicability option on the separator running off a dynamic recalc rule to do the hiding. That's off course if the need to hide is purely layout as opposed to a secure hide. I have a number of these working on a dynamic rule and it runs very smoothly

Also, if you do it this way you may want to hide the border of the separator (making it invisible) using a css class in the advanced script (render section). This way the separator is there but invisible when open or closed
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by BenHayat »

ACDC wrote: Also, if you do it this way you may want to hide the border of the separator (making it invisible) using a css class in the advanced script (render section). This way the separator is there but invisible when open or closed
This was my problem using separator which was causing gaps in the UI.
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by ACDC »

This was my problem using separator which was causing gaps in the UI.
You can get rid of the gaps with a custom CSS class in the form advanced script, I can dig it up for you if u are interested
BenHayat
Posts: 2749
Joined: Thu Dec 23, 2010 5:48 am
Location: Fla, USA
Contact:

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by BenHayat »

ACDC wrote:
This was my problem using separator which was causing gaps in the UI.
You can get rid of the gaps with a custom CSS class in the form advanced script, I can dig it up for you if u are interested
Well, if it's not too much trouble.
customaware
Posts: 2401
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by customaware »

Yes, that would be very interesting to see.
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: 2450
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by Jaymer »

... here's hoping we soon get that new feature to just set DISPLAY=FALSE for any attribute/field.
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: 2401
Joined: Mon Jul 02, 2012 12:24 am
Location: Ulaanbaatar, Mongolia

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by customaware »

Nice spot Jaymer.

Sometimes cannot see the wood for the trees. I feel like such a Dill.

For those wondering.....

Jaymer just reminded me that for the above inequality test I should have been using ANDs rather than ORs.

Doh! Face Slap!

Thanx Man.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Image
ACDC
Posts: 1142
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: BUG or Limitation- READ PROTECT not hiding Reference

Post by ACDC »

I added the code to customise a separator here in the tips ad tricks section

http://www.awareim.com/forum/viewtopic.php?f=4&t=9323
Post Reply