How to show mandatory fields on the pop-up when we clicked on UI Action?

Sathwik1
Tera Expert
In SOW Workspace, in the problem table, we had a state field as Assess and there is an UI Action as Assess when we clicked on that UI Action, a Popup is getting appeared in which it is asking to fill Assigned to field.. now I added one more field as mandatory that is substate, but why in popup substate is not showing?



do I need to configure anything additionally?

UI Screenshot

Sathwik1_1-1768455706849.png

 

UI Action Screenshot

Sathwik1_2-1768455761143.png

 


@Ankur Bawiskar please help

3 REPLIES 3

Ankur Bawiskar
Tera Patron

@Sathwik1 

it comes from this Problem Form View -> Assess Dialog Form View

Add/remove fields on that view and it will start showing

To make mandatory you can create UI policy on problem table which applies to only that view and make field mandatory

AnkurBawiskar_0-1768461075369.png

 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Sathwik1 

Hope you are doing good.

Did my reply answer your question?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Its_Sagnic
Mega Guru

Hi @Sathwik1 ,

I have a exact solution for you that will meet your needs.

SagnicDas_dev_0-1768596684238.png

The Image that I pasted above I hope you are asking for it ..

Actually there Is an UI Script (ProblemModalUIHelpers) -- > from which It's calling a Business Rule ( Update Problem State to Assess) -- > and the from that It's calling a Script Include Base ( ProblemStateUtils ) --- > Then a child Script include ( ProblemStateUtilsSNC) --> within that script include it's calling the function (

getReqFieldsFromUI ) ...

This function is actually managing the value that is populating in UI page. So if you want to add another value called substate within that Ui Page you need to follow thw below process.


1. So first we need to create a record in a table called Section Element (sys_ui_element.LIST) . 

2. Once you open the table you need to put a filter { sys Ui Section (click on show related record)  ->view (click on all view fileds ) ->name } -- is -- assess_dialog_form_view . 
3. You will get two records that are already created ( state, assigned_to) create abother record and while creating the record put the Element name as the backend name of substate field. That you created within the problem.

SagnicDas_dev_1-1768597634839.png

4. Then create a UI Policy.
5. Put a condition as While State -- Is one of --  new and Assess.
6. create a UI policy Action and put substate as Mandetory.


It will show you the substate field in the UI Page.

So if the solution is helpful for you please mark it as Helpful and also accept the solution if its solve your purpose.

Regards,

Sagnic