cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X

Copy field and do not make editable

ptc-5150641
1-Newbie

Copy field and do not make editable

All, I am currently copying a field from one item type to another via a relationship field. The issue I am having is implementing the copy so that the field is not editable in the copied form from the relationship field. The field is currently just copied and then locked once you perform the first state transition (Unspecified -> Draft). I am curious if any of you have had to implement something similar to this scenario and what your implementation was.

2 REPLIES 2
akadam
6-Contributor
(To:ptc-5150641)

Hello Anthony,

I am not sure, if I understand your problem completely but looks like similar to mine.

My problem - I have Type A parent and Type B child with set relation ship between A and B. When I create Type B related item of Type A, I am copying fields from Type A that I do not want to be editable in Type B item.

Solution I implemented - I created FVA field based on relationship and added it on child type. When I am creating related item (child type), I get my value copied from parent to child item and its not editable in child item.

Drawback of this solution - If I have multiple childeren attached to single parent, then when I copy parent again into another parent type (copy fields are set includes relationship field too), I am getting error. If I remove relation ship fileld from copy list, then parent item gets copied but then associated other type childrens are lost in new copied parent.

In my case copy / edit freqency is not too much, so we are ok with recreating related child items again.

Hope I am close to your problem.

Thanks

Adhik

khoppe
14-Alexandrite
(To:ptc-5150641)

Hello,

I had a similar problem in the past (btw. I think so).

My solution is:

Pre-Requisite: for overall activities we are using a System (Flat) Account "mksbatch".

In our task I've had a copy action within one type from one field into another ("change analyse" vs. "Change actions" to communicate to the customer).

Field "change analyse" is editable for a role Developer which is assigned to nearly every team member of a project. Field "Change actions" is editable only for the role PCM (Problem and Change Manager) which is the main contact to the customer.

A rule-based trigger now checks while saving an item's change whether something has changed in field "change analyse" and copy it's content to field "Change actions" if this is empty. Our PCM's have a notification rule that informs about changes of field "Change actions" from empty to any content to get them rid of checking the content whether there are infos included that the customer doesn't need to know.

You are working with two different types, and your solution is the definition of Editability related to the state of the item. Maybe the definition of editability combined with the user's role will give more flexibility to you.

Greetings and a happy new year.

Klaus

Top Tags