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
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


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

View solution in original post

abirakundu23
Mega 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

luffy3478
Tera Guru

client side - create an on change client script on "first name" field and clear out "last name"

server side - create a on before BR to check first name is empty and clear the last name