How to make field visible and make mandatory when we change value from field 1 to field2?

Ramu6
Tera Contributor

Hi All,

 

Actually we have  three reference fields(Assigned to , Secondary officer, Primary Officer), so here whenever incident created these are empty and we assigned one officer, now the requirement was like

1) if for example when incident created three are empty so when we try assigned one of them there is one more field "Remarks " will not display

2)if for example after created i selected "Assigned " field value and save the form, after if user trying to change that value to another then remarks field will appear and mandatory

3)And next scenario continuation to above one, if user want to change the other field value like , making "Officer" field value as empty and if he want to select "Primary Officer" value , then also remarks field will appear and mandatory

And vice versa for others as well

 

Please help me to complete this

Thanks

Ramu

7 REPLIES 7

Ramu6
Tera Contributor

Hi All. Actually i have written this client for all three fields, it is working only individual , but it was not working if i am trying change the value between any of two fields

Ramu6_0-1722326518027.png

Please suggest any modifications to this 

Thanks

Ramu

Get rid of your 'else's'. You are saying now if field a is updated do this. If not, don't. But that will collide with the other client scripts. Only apply what they are supposed to do on change, not what they should not do.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

@Mark Manders 

Thanks for the response

 

If i remove else part from all three scripts then it display the field(remark) when i am trying to change from one to other field , but it doesnot make it as mandatory