Add an Alert message to a Request form via portal using Flow Design

Winnie P
Mega Sage

Hello there, Can you add an alert message to a Catalogue Item via servicenow portal using Flow Design? If so, please kindly provide the how to?

I am looking to create a Flow Design for one of our Catalogue Items.  The scenario would be if a Requester adds a name to 'Who is Request for?" > Then the Flow to:

1. Look up Hardware assets table for 'Allocated to' field

2. If the 'Allocated to' has the 'requested for' name, then

3. Show an Alert message advising the Requester is already assigned a Computer, then

4. Clear the 'Who is this Request for' field

This is so that users doesn't raise a request for a computer if they already have one.  Is this possible via Flow Design or would this be a client script? Or what would be the best method?

Thank you.

find_real_file.png

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

alert() is client side code and flow runs in background.

so not possible

you will require onChange on that variable and use GlideAjax to verify

Regards
Ankur

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

View solution in original post

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

alert() is client side code and flow runs in background.

so not possible

you will require onChange on that variable and use GlideAjax to verify

Regards
Ankur

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

Thank you Ankur, using onChange and GlideAjax worked. Regards Winnie.

Aman Kumar S
Kilo Patron

Hey,

To answer your question, onChange with GlideAjax.

And talking about flow designers, they run in the background as Ankur suggested, also flow designer only kicks in when you submit a request and your RITM is generated.

Best Regards
Aman Kumar

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi Winnie,

As others have already replied, Flow Manager executes after the from is submitted. According to the requirements, it is necessary to validate the data before the form is submitted.

That said, it's very difficult to understand the requirement.

>I am looking to create a Flow Design for one of our Catalogue Items.  The scenario would be if a Requester adds a name to 'Who is Request for?" > Then the Flow to:

This implies the form has a field "Who is Request for".

>1. Look up Hardware assets table for 'Allocated to' field

Is there a field on the form to look up the hardware table? Later specification mentions "computer". If "computer" then shouldn't it lookup the computer table (cmdb_ci_computer)?

Anyways, is there a reference field to select a computer? Is so, won't it be easier to just list computers that has not already been assigned rather than listing all computers and checking if it has been assigned to somebody else?

>2. If the 'Allocated to' has the 'requested for' name, then

Is "Allocated to" a reference field to "requested for" table instead of User table?

Is the "Allocated to" a custom field in table Hardware?

Is "requested for" another field in table Hardware? Is it a reference field to User table (sys_user)?

>3. Show an Alert message advising the Requester is already assigned a Computer, then

Above requirement mentioned Hardware table. Is it Computer or Hardware?