Client script: Get values from additional columns in reference field

Eckhard
Tera Contributor

Dear colleagues,

I have a client script in a variable set and I want to get the value from a reference field that references a CI table.

In this reference field I have configuered (ref_auto_completer=AJAXTableCompleter) that 3 columns are visible: name, ip_address,owned_by.

So when the user searches his CI in the list he sees a list with 3 columns - CI-name, ip_address_owned_by

Of course I can easily get the value of the CI name with:

g_form.getValue('[variabe_name') or g_form.getDisplayValue('[variabe_name').

But I want to get the value of the ip_address which is available in the list when the user searches for the CI.

 

I know that I could use the sys_id and AJAX to query the database-CI-table, but this is not what I am looking for.

I believe the value of the ip_address is already "there" because it is in the list when the user selects/sees it.

So I am wondering if there is an option to get this value in my client script.

 

Many thanks

Best regards

Eckhard

P.S:´.: I am on Tokyo

 

5 REPLIES 5

Sure and thank you for sharing that.

 

Cheers,

Anish