Skip to main content

Howdy Ataccama Community!

Have you ever wanted to have a user see a field while in edit mode, but want to have it greyed out for editing? This problem arose while we were working with a Primary Key that needed to be seen in edit mode but never edited. The only way for a field to be seen in edit mode, is to set it to Modify in the permissions, but we did not want the user to modify. 

Problem: Show all fields in Edit mode, but only have certain ones editable.

Solution: Begin by deploying your project and populating any tables with initial loads as needed. Next go back to OneDesktop IDE, and open the table you are wanting to make some fields non-editable. For the fields you want to make non-editable select Generated. While this sounds like it will auto generate the field, I assure you it does not.

Now generate and deploy your project again (remember to generate at the App Configuration level).

Note: You might need to stop and restart services for the change to take effect. While I was testing locally, I had to close One Desktop IDE all the way, and reopen to see the change - likely due to cache issue.

Note 2: This only works when editing a record. When creating a new record, all fields marked as Modify, will still be available to the user.

What you should see is that the fields you selected are now greyed out, and non-editable. Through my testing, Enrichments did still affect these fields. As such, if these fields are being enriched, you will need to build logic to avoid the fields being changed (unless change is still desired - such as the fields should be enriched, but never manually entered).

 

Happy Midweek, and hope this is helpful! Please feel free to ask questions in the comment section!

Thank you,

Jason R.S.

 

Thank you for sharing as always @Jason.Suptic !


Reply