This topic is locked

Users specific section of form

7/26/2010 7:27:51 PM
ASPRunnerPro General questions
T
tone21705 author

Hi,
I am using 6.2 and have a list/add/edit page and also a login page with multiple users.
I would like certain users (depending on group) to see extra questions on the form.
For example,

I have questions 1-10, by default everyone can only see 1-7.

If you are part of the group "admin" you see 1-10.
Is this possible? If not what do you suggest?
I guess I could make 2 separate ASPRunner websites?
Thanks,

Antoni

A
ann 7/27/2010

Antoni,
open Advanced security settings dialog on the Security tab and choose Users can see and edit their own data only or Users can see other users data, can edit their own data only option. Choose 'group' field as OwnerID fields for both 'questions' table and 'users' table.

T
tone21705 author 7/27/2010

Hi Ann,
Thank you for the reply. It seems to me like the method you suggested is for the data (responses) and not for the questions.

In my application, everyone can see all the records submitted from everyone. But for example, when unprivileged UserA clicks on Add New or Edit they see questions 1-7.
While when privileged UserB clicks on Add New or Edit, they see questions 1-10 and, if they clicked edit, the answers associated with that record.
Here is 2 screen shots of the edit example to hopefully help clarify.

Privileged User (sees everything)

http://yfrog.com/n3privp
Unprivileged User (sees only minimal questions)

http://yfrog.com/b9unprivp
Thanks,

Antoni

A
ann 7/28/2010

Antoni,
you can hide fields in the Before Display event on the Events tab.

Here is a sample:

xt.assign "FieldName_fieldblock", SESSION("GroupID")="GroupA"



FieldName edit box will be shown only if GroupID equals "GroupA".

T
tone21705 author 7/28/2010

Thanks for the response Ann. The sample code was great but it only worked in the Add page : Before display
When I tried the same code in Edit page: Before display it didn't work. Same for List page: Before display.
The code I am pasting in is

xt.assign "DeathExpected_fieldblock", SESSION("GroupID")="QM"

xt.assign "MMDate_fieldblock", SESSION("GroupID")="QM"

xt.assign "SERDate_fieldblock", SESSION("GroupID")="QM"

xt.assign "PreventableCode_fieldblock", SESSION("GroupID")="QM"

xt.assign "ProblemsWithCareDelivery_fieldblock", SESSION("GroupID")="QM"

xt.assign "CareDeliveryIssue_fieldblock", SESSION("GroupID")="QM"

xt.assign "FollowUP_fieldblock", SESSION("GroupID")="QM"


I am trying 2 users. One in the group "QM" and the other in the group "test." On the Security tab Permissions screen I added both groups with static permissions. The QM group is Admin group and both have all the boxes checked.
Is this right?
Thanks so much for your help and quick responses on this topic. Really great support!
Antoni

A
ann 7/29/2010

Antoni,
the code should work on the Edit page.

It's difficult to tell you what's happening without seeing actual files.

Please publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error. 'Demo Account' button can be found on the last screen in the program.