We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Filter table using field another table

Rovereto
Tera Contributor

Hello team,

I am trying to create a filter condition that will display the table entries only in case the incident number is different from the number stored in a field of another table.

smth like this:find_real_file.png

Notice: I have added to the main table (the one I am filtering) a field that is referencing to the other table (the one containing the filed that should not match the incident number) so that I could dot walking in the filter.

When I run such filter, I get nothing

Is there a way, probably via script, to create this condition?

Thanks a lot and sorry the silly questions

5 REPLIES 5

Rovereto
Tera Contributor

Hi,


Thanks for your reply!



I managed to do that using g_form.getReference, in this way I can dotwalk in the client script. For some reason I can get the displayed value of a filed but I cannot make work setValue



ex.


var bla = g_form.getReference('u_inc_number').u_reviewed;


  g_form.setValue(bla, true);



The tick box of Reviewed does not get ticked. Is there something working that I did not notice?



Also last question



Using the same script I am able to "copy" a referenced field value to another column hosted on the form's table... but I am unable to manage the same if I want to copy the comment field of an incident. is there a specific reason why this is not possible?



ex.


var bla = g_form.getReference('u_inc_number').short_description;


  g_form.setValue('my_field', bla);


// works and I can see the short description of an incident in 'my_field'



var bla = g_form.getReference('u_inc_number').comments;


  g_form.setValue('my_field', bla);


// does not work, nothing is returned.



Thanks a lot and have a nice week end:)