How to allow only author to edit the controls in a panel

  • 12 April 2017
  • 6 replies
  • 8 views

Badge +2

I want only created by user to edit the form and readonly for all other users.

I tried Current User==Created By didnt work

Then I tried to put a single line text box to get the value of created by field which displayed Null, however, in the other single line text field the current user value is displayed like i:0#.w|domainusername that too only in create new item mode but not in Edit mode.

The created By value is not displayed all times (new, edit or display).

Please help.


6 replies

Userlevel 5
Badge +14

text box's default value is only populated in NEW form. therefore you do not see it in other cases.

you have to compare named control on the form to the CurrentUser reference, comparison to list field (item property) do not work OOTB.

since 'Created By' list field can not be placed on the form, you will have to create and maintain your list field for Author.

to compare Author to current user use formula

userEquels(CurrentUser,AuthorNamedControl)
Badge +4

Can't find (( AuthorNamedControl ))?!?!

Userlevel 5
Badge +14

this is just an example. you should put in there reference to you custom 'Author' control from 'Named controls' tab.

Badge +4

not working also .

Please  if @Altaf Hussain  , find the solution can you tell me ?

Userlevel 5
Badge +14

Obaida Aqel‌, I'd recommend to create brand new question and describe into very details your setup and problem(s).

without knowing that it's to hard to provide any sensefull answer to your "Can't find" and "not working also" claims.

Badge +2

You need to create a people field with select Account and then update that field with which ever user you like and compare panel / control with that field that is the best possible solution.

It worked for me all the time.

Reply