Automatically remove name from of the field

Mustafeez
Tera Contributor

Hi Folks,

 

I have two fields, "X" and "Y," where "X" contains my first name and "Y" has my last name. If I remove the first name from one of the fields, the last_name will also be removed automatically.

 

Thanks,

Mustafeez.

2 ACCEPTED SOLUTIONS

AshishKM
Kilo Patron

Hi @Mustafeez , 

Write client script [onChange ] on the same table and check if first field value is empty or "" then clear the value from last name field. 

 

and if this for any catalog item , then write the onChange catalog client script with same code logic. 

-Thanks,

AshishKM

View solution in original post

abirakundu23
Giga Sage

Hi @Mustafeez ,

Not pretty much clear the requirement, however mentioned below approach. Please mention the requirement clearly with screenshot.

a. If requirement is " remove the first name from one of the fields, the last_name will also be removed automatically."

Please write " on change " client script on "First Name" field & add "clear value" function for the value of the last name field.

b. 

If requirement is " remove the first name from one of the fields, the last_name will also be removed automatically."

Please write " on change " client script on "First Name" field & add "remove function" for the last name field.

c. you can use UI policy as well based on your requirement.
d. Use before/update BR where its set the 'last name' value empty based on the 'first_name' value.

Please mark as helpful & accept answer if it's really worthy for you.

View solution in original post

5 REPLIES 5

Isaac Vicentini
Mega Sage

I didn't quite understand what needs to be done. Could you contextualize the issue and provide more information?

AshishKM
Kilo Patron

Hi @Mustafeez , 

Write client script [onChange ] on the same table and check if first field value is empty or "" then clear the value from last name field. 

 

and if this for any catalog item , then write the onChange catalog client script with same code logic. 

-Thanks,

AshishKM

Thanks @AshishKM 

abirakundu23
Giga Sage

Hi @Mustafeez ,

Not pretty much clear the requirement, however mentioned below approach. Please mention the requirement clearly with screenshot.

a. If requirement is " remove the first name from one of the fields, the last_name will also be removed automatically."

Please write " on change " client script on "First Name" field & add "clear value" function for the value of the last name field.

b. 

If requirement is " remove the first name from one of the fields, the last_name will also be removed automatically."

Please write " on change " client script on "First Name" field & add "remove function" for the last name field.

c. you can use UI policy as well based on your requirement.
d. Use before/update BR where its set the 'last name' value empty based on the 'first_name' value.

Please mark as helpful & accept answer if it's really worthy for you.