Questions on Hidden Data

0
Hello folks, I have few doubts on hiding the data in Mendix, I have a page which contains data in different sections (in the form of navigations) to be filled. Let’s say I have 5 different sections and in each section, I have to hide some of the data which is not required to fill. So my questions are; Question1: How do we hide the data that is not required in each section Question2: Also, the hidden data is not required to complete the form (Though the hidden data is not filled, my page/form should not stop me completing it. I.e. When I click on ‘Complete’ it should not stop me completing it because of the unfilled hidden data). My requirement is, I should able to complete the form without hidden data. Question3: Also, the hidden data should not print (When I do the print). What I setting I enable not to print this information. Please suggest me if anyone has Idea on this, thank you.   Regards, Venu    
asked
1 answers
0

Hi Venu,

When you click on the properties of a widget or container there will be a section called “visibility”. Here you can set the visibility of your selection based on a module role, attribute value of the entity that is the data source of the dataview that its contained in, or using an expression. The expression gives you more flexibility to show or hide your selection based on the multiple conditions. For example you could write something like this :

 

if attribute 1 and attribute 2 were questions on your form you could write

$CurrentObject/attribute1 != empty and $CurrentObject/attribute2 != empty

 

This will make your selection appear only after the the first two questions are answered. 

 

Another option would be to hide the data using entity access rules. Here is some helpful documentation for that.

https://docs.mendix.com/refguide/security

https://docs.mendix.com/refguide/access-rules

 

Hope this helps!

answered