The CreatorCon Call for Content is officially open! Get started here.

Setting Reference Field Values from Another Value of the Same Table

Wasdom_Kung
Tera Guru

Hello,

I currently have a reference field that pulls information from a table - as you can see below there are multiple entries for A053501, but the second and third columns of this table will have differing information (This is fine).

find_real_file.png

When a user selects a value, say row 1 from above, the field 'All associated trays' should populate all of the entries with the same ID (A053501) just so the user can cross-check their selection.

find_real_file.png

I've read multiple threads about using javascript as a reference qualifier:

javascript:"u_all_associated_trays=" + current.u_unique_tray_id

and also using / setting dependent fields (I haven't been able to find this though)

 

Any help is appreciated.

1 ACCEPTED SOLUTION

Wasdom_Kung
Tera Guru

This was actually re-designed to be achieved using a script include and by changing the field from a reference to a unique value field (This has a big performance impact considering how many values we are using - over 30k - but it will do for the time being)

View solution in original post

14 REPLIES 14

Murthy Ch
Giga Sage

@Wasdom Kung 

If you want to auto populate use GlideAjax and return the data from server side.

If you want to filter according to the tray type id your logic is correct.

 

Thanks

Murthy

Thanks,
Murthy

The issue with my logic is that no values are returned to the All associated trays field, I think its because 'Tray type ID' field has not been set as the dependent value - do you know where I would set this?

Hi,

javascript:"u_all_associated_trays=" + current.u_unique_tray_id;

The one which I kept in bold is that a field name or variable name ?

You need to compare with field name(in table).

Thanks,
Murthy

Ah, so the part in bold I had set to variable u_all_associated_trays, not to a column in the table.

SoI have changed this to each of the column values e.g. u_tray_id, u_tray_nam, u_tray_type_id. but nothing is populatingin the reference field yet

Below are the table columns if it helps:
find_real_file.png