First of all, I would like to apologize for the quality of the code below, as I am not a programmer.
However, I would like to make a field read only and set the value of the field to a default value based on User Level. If they are not in any of those two user levels (4 and 6), then they should be able to updated the field with a value
Please see my attempt at doing this which is throwing an error
I am using the Row Rendered Function
// Row Rendered event
public void Row_Rendered() {
//VarDump(<FieldName>); // View field properties
if CurrentUserLevel() == "6"?:
{
SelfServiceUserName.EditValue = "Not Authorized";
SelfServiceUserName.EditCustomAttributes = "readonly=\"readonly\"";
if CurrentUserLevel() == "4"?:
{
SelfServiceUserName.EditValue = "Not Authorized";
SelfServiceUserName.EditCustomAttributes = "readonly=\"readonly\"";
Else
SelfServiceUserName.EditCustomAttributes = "not changed";
}
}