In our Assets object scheme we have a legacy attribute that needs to be read-only for all users (even the ones with the permission to edit other attributes in this scheme).
I was able to remove the attribute in the edit screen of the objects view using Javascript.
But for the details view of an object I can't use this hack since the attribute does not have an id or something.
Is there another (better) way to make one single attribute uneditable or read-only?
Export the object to a csv:
Create a new object (as a child of the original object) to only hold the legacy attribute data
Import the csv into the new object - Name and legacy attribute
Create a new attribute on the original object linked to you new object
Edit the csv to only contain 2 columns Name and Copy of Name
Import the new csv into your old object mapping the 'Copy of Name' to the new attribute
Check that in the Object view when you click on the new attribute it takes you to the new object
Configure the new object so that everyone only has user access
On the original object delete the old legacy attribute
Try all of that out on a test object before doing it with your live data!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And to delete the legacy attribute from your original object:
But really, really important it so test all this on a test object before doing anything with live data
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Stephen_Lugton Thank you for your solution.
In addition I added an attribute "Original Object" as a reference to the Original Object in the New (read-only) Object and the following AQL Filter to the "Legacy Attribute Reference" in the Original Object so users can't change it.
"Original Object" = ${Key}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexander,
Isn't removing it from the Attributes View an acceptable solution for you?
I am looking for a solution for what you seem to have solved, removing an attribute from the Edit screen. Could you please provide more details about it?
Thanks in advance.
Alexandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
removing the attribute from the View still makes it available in the editor.
I needed a way to make the legacy information available to editors of my object without the possiblility to change the value of my legacy information.
I ended up putting the legacy information in an additional object type (see accepted answer).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alexander and thanks for your reply. You mentioned in your initial question the following:
"I was able to remove the attribute in the edit screen of the objects view using Javascript."
Could you please provide more details about how you did it?
Thanks in advance,
Alexandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.