Agent mobile app - On a form, how to make a field dependent on another field ?

Ximizu
Mega Guru

Hi all, on the agent mobile app, I have setup a Function of type Action with three UI Parameters

  • Offer
  • Gencode
  • Serial number

The result look like this:

find_real_file.png

The UI Parameter Offer is an input of type list, pointing to a reference field pointing which the target table is Offer.

The UI Parameter Gencode is another input of type list, pointing to another reference field which the target table is Gencode.

The Gencode is dependent on the Offer following this data structure:

  • Offer A
    • Gencode 123
    • Gencode 456
  • Offer B
    • Gencode 789
    • Gencode 101112

 

Expected behavior: if the user select the offer A, in the Gencode field, he should be able to select only the gencodes 123 and 456. If he select the offer B, he should be able to select only the gencode 789 and 101112.

 

Do you know if its is possible to setup this Agen mobile app to have the above behavior ?

Ximizu

1 ACCEPTED SOLUTION

David Ha
ServiceNow Employee
ServiceNow Employee

Hi Ximizu,

 

If they are reference fields, one can be added as dependent on the other

Like for example, in the dictionary of the “Location” field, “Property” can be added as a dependent. That should work in the mobile also when both Location and Property are added as UI parameters.

You can refer to the OOTB “Assignment group” and “Assigned to” fields from the Incident table as an example.

 

To do this:

- Go to the dictionary of the field and check the Dependent Field.

- For mobile, you have to explicitly define this in order for the filter to work.

 

Best,

David

View solution in original post

4 REPLIES 4

David Ha
ServiceNow Employee
ServiceNow Employee

Hi Ximizu,

 

If they are reference fields, one can be added as dependent on the other

Like for example, in the dictionary of the “Location” field, “Property” can be added as a dependent. That should work in the mobile also when both Location and Property are added as UI parameters.

You can refer to the OOTB “Assignment group” and “Assigned to” fields from the Incident table as an example.

 

To do this:

- Go to the dictionary of the field and check the Dependent Field.

- For mobile, you have to explicitly define this in order for the filter to work.

 

Best,

David

Thanks David, it works as expected.

To be honest, I was a bit skeptical at first, because I was wondering how define the "dependent values".

When defining "dependent" in the dictionnary for a choice, it's clear, like Category and Subcategory of the table incident. On the dictionnary of Subctagory, you define Category as the depdent field, then you define the dependent values in the choice list related list.

Regarding fields of type reference, you don't need to define dependent "values", I guess ServiceNow find itself how to make the dependency based on the reference fields find on the target table.

 

Swapnil20
Tera Contributor

Hi David,

Can you help me to understand what configuration is required in mobile app. I have created two fields as UI parameter in mobile app similar to assignment group and assigned to, added dependent value also. But still in agent app assigned to is not becoming dependent instead its showing full list of users. I have added in correct order also.

 

Thanks

Swapnil

Roopa6
Tera Contributor

I am looking for same. Did you get solution for this Swapnil? 

If yes, can you please share it.