How to make field visible and make mandatory when we change value from field 1 to field2?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 10:00 PM - edited 07-29-2024 10:07 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 10:09 PM
You can achieve this through a couple of onChange client scripts. You can use setVisible() and setMandatory() on those fields.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 10:14 PM - edited 07-29-2024 10:18 PM
Thanks for the response , Actually we have written onchange client scripts for the fields , but those are working individually only, not working when we try to change between two fields
this is the client script we wrote all three fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 01:41 AM
An onChange client script only runs on 1 field when it changes. You will have to apply a client script for each field that needs to do something when it changes.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-29-2024 10:14 PM
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark