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

Thanks Scott, I already had the filters in place as we only want 5 of about 600 services showing at this time! And all good with the Sys ID field thanks.



For 'bonus points (kudos!)' can anyone tell me how I can set the order that the referenced Service values appear in in the list - currently they are alphabetical but ideally I'd like 'Other/Unknown' at the top of the list. Thanks.


Hi Dasi



have you tried adding the ORDERBY<field name> in the reference qualifier?



Regards


Hi, currently my ref qual is:



name=Epoch (Global time)^ORname=GPMS (SAP)^ORname=Open for Conflicts (aka global conflicts, workflow)^ORname=Other/Unknown Service^ORname=Client and Matter Inception (CMi Open)^EQ



Would ORDERBY go at the start and then I list in order I want them i.e.


ORDERBY^name=Other/Unknown Service^ORname=Client and Matter Inception (CMi Open)^ORname=Epoch (Global time)^ORname=GPMS (SAP)^ORname=Open for Conflicts (aka global conflicts, workflow)^EQ



I've just tried above and the order looks to still be alphabetical unfortunately? Thanks for your help.


Hi Dasi



Apologies I did not understand that you didn't want them ordered alphabetically.



All I can think of is to create a new field on your table called something like u_order then do the ORDERBY on that field, the data you put in the field could be a, b, c etc. Alternatively use a field like Alias that is already there and give them a value that sorts in the order you want.



So it would still be sorting alphabetically just on a different field.



I'm just guessing though so it would need a bit of playing around



regards


jas101
Tera Expert

Hi guys scottbarnard,



Have a related follow-up q I wondered if you might be able to help with... so as needed (asked in this thread), the 'Service' value is now mapping from the ESS 'Get help' form to the corresponding INC that is created via the record producer however I have observed that the 'Urgency' value on the INC (which is set automatically from the Service.Business criticality) is not auto-setting (like it is when you create an INC via the normal INC form).



Any ideas? Many thanks,
Daniel