Let’s see what we need to do here.
- Let’s say I want the users to enter Customer Need data in Develop Stage.
- But, just view what data is present in Propose Stage shown below, not modify it. (I’ve just renamed the field to Summarize Customer Need instead)
- Now, since the Summarize Customer Need field is the second time, using getFormContext.getControl(“header_process_customerneed”) will be fetched to disable the first field only i.e. Customer Need in Develop stage.
- To access Summarize Customer Need, you need to append “_1” to the control name for the second occurrence. And _2 and so on for further occurrences.
Here’s the sample code which I used to access Summarize Customer Need to access the second occurrence of the field and use setDisabled(true) to lock it –
3. And that way, you’ll be able to access Summarize Customer Need control and do your desired operation (like even make it hidden or visible depending on your scenario) –
Hope this helps!