How to make a Variable Reference field a drop-down field (for INC record producer)?

jas101
Tera Expert

Hi guys, we need to add a mandatory variable 'Affected service?' to our CMS 'Report an issue' record producer. It is currently working fine as a (filtered) look-up reference field to the cmdb_ci_service table but to make it more user friendly and as there are currently only 5 services to choose from we ideally want this as a drop-down list.

While I can get this to show fine using Type 'Lookup select box' the problem with this is that the Service value selected on the CMS form does not then map to the Service field on the INC - like it does when it is a reference field. How can I best achieve this please?! Indeed, is it even possible.

Many thanks,

DS

1 ACCEPTED SOLUTION

oharel
Kilo Sage

If I understand you correctly, then I have something similar with my Category field. See below:



find_real_file.png


The field to which the category is mapped is a reference field, which I turned into a drop down with "max_ref_dropdown=50"


If that's not it, then:


What do you get one you try it your way?


What type is the field that you are mapping to (the target field)?


Harel


View solution in original post

9 REPLIES 9

DilipKumar DJ
Kilo Guru

Hi Dasi,



I don't think it's possible using the available reference variable type. And even this variable type do not have any variable attributes for enabling this feature.


oharel
Kilo Sage

If I understand you correctly, then I have something similar with my Category field. See below:



find_real_file.png


The field to which the category is mapped is a reference field, which I turned into a drop down with "max_ref_dropdown=50"


If that's not it, then:


What do you get one you try it your way?


What type is the field that you are mapping to (the target field)?


Harel


Wow, it appears adding 'name' to the Look label field(s) is all it took as I had tried with 'Sys ID' as the Lookup value field prior (but without entering anything for Lookup label field). Many thanks indeed Harel!


scott barnard1
Kilo Sage

Hi Dasi



Using Harel's example above you can also extend the reference qualifier condition to just show the 5 records that you are after. at the moment it shows all records where a tick box called u_active is true. You could create a tick box on your cmdb_ci_service table for the same purposes or use another condition to suit.



Just be really careful to select the lookup value field as the sys_id. If you don't you'll get the values in the form when you use the producer but they will not map to the record created.



Regards