Forums: [SOLVED] Hide Column (List) when not in a Security Group - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

[SOLVED] Hide Column (List) when not in a Security Group Rate Topic: -----

#1 User is offline   Jan K. van Dalen 

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 22-September 17

Posted 08 March 2018 - 10:38 PM

Ok, I'm pretty new to ASPRunner.Net. I did search the manual and the forums but can't figure how to accomplish the following:

Using 9.8 / Bootstrap / AD Authentication with Dynamic Permissions / List Page

Column is a recording (blob) and set to View as Audio ... this works great

I need to hide the column in a List Page if the user is not part of a group.

I tried using a hammer just to test if I could hide the column regardless and added:

pageObj.hideField("Media");

in the onload event of the List Page but did not work.

Questions:
  • How can I hide a column?
  • How can I hide based on a security group?


Many thanks in advance

Jan K. van Dalen
Jan K. van Dalen
0

#2 User is offline   jadach 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 414
  • Joined: 26-April 08

Posted 09 March 2018 - 12:33 AM

Here is a snippet I just used to hide the value of a field on certain rows.

List page after record processed

if (data["Accepted"] == "1" && data["PracticeID"] != data["PracticeID1"]) {
record["Staff_value"] = false;
}


Staff_value is the Field Name_value

So in your case, you can use a session variable to identify the role, then use that session variable in your List page after record processed event
-jerry
0

#3 User is online   admin 

  • Administrator
  • PipPipPip
  • Group: Admin
  • Posts: 15956
  • Joined: 03-February 03

Posted 09 March 2018 - 03:43 PM

hideField() will work but you need to use a correct event:
https://xlinesoft.co...s/hidefield.htm
Best regards,
Sergey Kornilov
0

#4 User is offline   Jan K. van Dalen 

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 22-September 17

Posted 12 March 2018 - 02:56 PM

Thank you Jerry ...

View Postjadach, on 08 March 2018 - 07:33 PM, said:

Here is a snippet I just used to hide the value of a field on certain rows.

List page after record processed

if (data["Accepted"] == "1" && data["PracticeID"] != data["PracticeID1"]) {
record["Staff_value"] = false;
}


Staff_value is the Field Name_value

So in your case, you can use a session variable to identify the role, then use that session variable in your List page after record processed event

Jan K. van Dalen
0

#5 User is offline   Jan K. van Dalen 

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 22-September 17

Posted 12 March 2018 - 03:03 PM

Thank you Sergey

View Postadmin, on 09 March 2018 - 10:43 AM, said:

hideField() will work but you need to use a correct event:
https://xlinesoft.co...s/hidefield.htm

Jan K. van Dalen
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked