Switch views based on values of a field

Elena Pomana
Tera Guru

Hello,

 

I need to switch between views based on a field on the form.

The task is the following:

  • if field "Test" is choice 1 -> view should be "view 1"
  • if field "Test" is choice 2 -> view should be "view 2"
  • if field "Test" is choice 3 -> view should be "view 3"

find_real_file.png

I created a view rule that does that:

find_real_file.png

The problem is with new records, is it possible to change views in a new record based on the user's choice?

I tried to do the same logic in onChange client script but I need to save the record in order to display a view.

find_real_file.png

 

Thank you,

Elena

6 REPLIES 6

Hi,

 

onChange CS doesn't work. It makes the user save the form first and we do not want that.

On a new record, onLoad won't be an option, because the field is -None- and when the user chooses an option it will enter a loop. Tried it for testing purposes and it kept refreshing the page.

 

Have a nice one,

Elena

Hi,

that's correct.

Regards
Ankur

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