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

Sorry

It should be current.variables.u_unique_tray_id

As you are using it on record producer variable.

Please use like below:

javascript:"u_tray_id=" + current.variables.u_unique_tray_id.u_tray_id.getDisplayValue();

 

Thanks,

Anil Lande

Ah this is a catalog item not a record producer

Hi,

Please check type of field (column 1 ) on the reference table, if that is string then you need to use something like below:

javascript:"u_tray_id=" + current.u_unique_tray_id.getDisplayValue();
// here u_tray_id is name of 1st column in reference table

 

If you are trying to achieve this on record producer / catalog item then you need to use current.variables.u_unique_tray_id.getDisplayValue();

 

If 1st column is of reference type then you need to use:

javascript:"u_tray_id=" + current.u_unique_tray_id.u_tray_id.toString();
// here u_tray_id is name of 1st column in reference table

 

Please replace u_tray_id by the name of 1st column.

 

Thanks,

Anil Lande

Hi Anil,

I've set my reference qualifier to the following to no avail:

 

javascript:"u_tray_id=" + current.variables.u_unique_tray_id.toString();

javascript:"u_tray_id=" + current.u_unique_tray_id.toString();

 

toString because they are reference fields, but I've also tried getDisplayValue();

u_tray_type_id is the display column for the table

find_real_file.png