Component copy paste values should not be saved | Community
Skip to main content
Level 2
Apr 28, 2020 11:28 AM UTC
Solved

Component copy paste values should not be saved

Hi All,

 

Is there a way to just copy the component and not its dialog element value ?

we have a textfield which we are populating with random number and it should be unique for each authored component. But when I copy paste component, the textfield value is also getting copied. I am trying to find a way if there can be a way to read this event and values are not copied.

 

Thanks in advannce !!!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
arunpatidar
arunpatidarAccepted solution
New Participant
Apr 28, 2020 3:45 PM UTC

Hi,

There is no way to avoid that until you write an explicit event listener on property added. But it will execute for all the time.

If this field is not mandatory then remove this property and if dialog open again, it will be pre-filled with random number and then you can save dialog again.

Arun Patidar

5 replies

Singaiah_Chintalapudi
Level 7
Apr 28, 2020 7:47 PM UTC

When you copy the component(s) then all of its properties would be carried over. There is no OOTB feature to exclude some.

Translate
arunpatidar
arunpatidarAccepted solution
New Participant
Apr 28, 2020 3:45 PM UTC

Hi,

There is no way to avoid that until you write an explicit event listener on property added. But it will execute for all the time.

If this field is not mandatory then remove this property and if dialog open again, it will be pre-filled with random number and then you can save dialog again.

Translate
Arun Patidar
Level 2
May 4, 2020 4:54 AM UTC
It is mandatory field. So can you help how explicit listener could be written
Translate
VeenaVikraman
New Participant
Apr 28, 2020 3:10 PM UTC

@yashaswidotiya Are you trying to copy the content node ? If I understand your question properly , I think you are copying the content node via back-end code and creating copies of the same . When you do copy of node, please be informed that values also will get copied. You can then replace the values in those nodes as required. 

Translate
Level 2
May 4, 2020 4:56 AM UTC
I am trying to copy the component in authoring mode.
Translate