Two Granite text field is storing values comma separated | Community
Skip to main content
New Participant
January 18, 2023
Solved

Two Granite text field is storing values comma separated

  • January 18, 2023
  • 2 replies
  • 779 views

I have two text field in my dialog Text field 1, Path1 and Text Field 2, Path2 both TF have same name (./title) and both Path has same name (./path). I wanted if the author enters some value in TF1 and TF2. Value of TF2 should be stored, but it is storing values comma separated.

 

I want to overwrite the value and Want TF2 and Path2 value to be there

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ArpitVarshney

Hi @ronnie09 

the name field is a unique value to identify a field. Giving two fields the same name and making them both editable would make a weird issue. Ideally, it should have a different name.

 

However if a business requirement wants to have two fields, the best way is to make another field disabled and make one field enabled so that only one field can be filled at a time. Another field would fetch the same value.

Regards,

Arpit Varshney

2 replies

Manu_Mathew_
New Participant
January 18, 2023

@ronnie09 Not really understanding the use case here, if you want both values to be stored with the same name, you could use a multifield which would have different items with the same name and you can iterate and use the last value of the multifield.

ArpitVarshney
ArpitVarshneyAccepted solution
New Participant
January 18, 2023

Hi @ronnie09 

the name field is a unique value to identify a field. Giving two fields the same name and making them both editable would make a weird issue. Ideally, it should have a different name.

 

However if a business requirement wants to have two fields, the best way is to make another field disabled and make one field enabled so that only one field can be filled at a time. Another field would fetch the same value.

Regards,

Arpit Varshney