the request is open and pending approval which is the status already 400 and use can save already the request and this sis good the issue when he try to change the status to approved i need to make sure the fields are filed before approve because it will open the ticket in service desk and before we save the ticket it the status will not change to 800 to inform the user to fill before approve
as you can see the fields in the red rectangle must be filled before approve but during the ticket still pending Approval it can be neglected because it takes some modifications first to other fields before they reach those fields to be filled
hope i explain it well , if you have any suggestions its appreciated your time and support
Original Message:
Sent: Jul 22, 2024 02:27 AM
From: Srinath Samudrala
Subject: service catalog on approve button need to make sure field is filled
Hi Ahmed,
We can control the mandatory state of the field using JavaScript expressions that can evaluate to a boolean value. This will enforce the user to fill the value during save operation. Here are few examples:
- Set the "Required" property value of a field to "$(_user.id == 'user1')"
This will make the field mandatory for a user whose userid is 'user1', for all other users, it is not mandatory
- Set the "Required" property value of the field to "$(_.request.status>200)"
This will make the field mandatory after request status is greater than 200(once request is submitted)
- We can also use binary operators in our expressions. Set the "Required" property value of the field to "$(_.user.roles[_.bu.id][0]=='enduser' && _.request.status==400)"
This will make a field mandatory if the user role is enduser and request is in pending approval status(400)
For more details, please refer to the below tech-docs page:
https://techdocs.broadcom.com/us/en/ca-enterprise-software/business-management/ca-service-management/17-4/using/service-catalog-management/manage-forms/perform-automated-tasks-in-form-fields/use-javascript-expressions-in-fields.html
Please look at the below image for reference:

Good day !!
Thanks,
CA Service Catalog Team
Original Message:
Sent: Jul 21, 2024 07:50 AM
From: Ahmed Mokhtar
Subject: service catalog on approve button need to make sure field is filled
i have a request which contain a form fields those form fields nto showing to the end user once its submitted it will show for the PMO group to change some fields then save without approve every time they fill some fields and save then once they approve it it will open a ticket in service desk
since i cannot make the field mandatory while they will save many time before approve
i need to make sure only when they approve those fields must be filled
any suggestion ?
for example we have 5 fields
the first field is mandatory(i make it required if the user is not the end user ) and they must fill and save to make a meeting with some other group then once they have the meeting they will fil some other 2 fields and may be fill one field i cannot make it required until they finished then at last stage they have to fill all the fields before approve
my question here how to check this just anormal save or its the final stage and they approve the request