Select Relation - Hide columns

Hi,

I have the fol,lowing Select Relation configured using 'Simple Values' as below:

column.0.displayField = y_installationheader.x_person_id
column.0.label = Person Id
column.0.operator = OperatorBeginsWith
column.0.searchField = y_installationheader.x_person_id
column.1.displayField = y_installationheader.(y_installationline->x_installation_header).x_line_number
column.1.label = Line No
column.1.operator = OperatorBeginsWith
column.1.searchField = y_installationheader.(y_installationline->x_installation_header).x_line_number
column.2.displayField = y_installationheader.(y_installationline->x_installation_header).x_product.(y_product->id).x_code
column.2.label = Code
column.2.operator = OperatorBeginsWith
column.2.searchField = y_installationheader.(y_installationline->x_installation_header).x_product.(y_product->id).x_description
column.3.displayField = y_installationheader.(y_installationline->x_installation_header).x_product.(y_product->id).x_description
column.3.label = Description
column.3.operator = OperatorBeginsWith
column.3.searchField = y_installationheader.(y_installationline->x_installation_header).x_product.(y_product->id).x_description
column.4.displayField = y_installationheader.(y_installationline->x_installation_header).(y_serialnumber->x_installation_line).x_serial_number
column.4.label = Serial Number
column.4.operator = OperatorBeginsWith
column.4.searchField = y_installationheader.(y_installationline->x_installation_header).(y_serialnumber->x_installation_line).x_serial_number
column.length = 5

And setting the Preson_Id from 'Loading script (after setFromCgi)'

eq.setFieldValue("addCriteria", Map("field=y_installationheader.x_person_id\noperator=OperatorEquals\nindent=0\nrowOperator=OperatorAnd\nvalue=" + customerId.toString() ));

 

This is working great, but I don't want to see the first two columns:

If I remove them, I get the following error:

column.0.displayField = y_installationheader.(y_installationline->x_installation_header).x_product.(y_product->id).x_code
column.0.label = Code
column.0.operator = OperatorBeginsWith
column.0.searchField = y_installationheader.(y_installationline->x_installation_header).x_product.(y_product->id).x_description
column.1.displayField = y_installationheader.(y_installationline->x_installation_header).x_product.(y_product->id).x_description
column.1.label = Description
column.1.operator = OperatorBeginsWith
column.1.searchField = y_installationheader.(y_installationline->x_installation_header).x_product.(y_product->id).x_description
column.2.displayField = y_installationheader.(y_installationline->x_installation_header).(y_serialnumber->x_installation_line).x_serial_number
column.2.label = Serial Number
column.2.operator = OperatorBeginsWith
column.2.searchField = y_installationheader.(y_installationline->x_installation_header).(y_serialnumber->x_installation_line).x_serial_number
column.length = 3

Please can someone advise what I'm doing wrong here, or how to get the desired result I'm after?

Cheers

Rich

 

 

 

 

 

RE: Select Relation - Hide columns

Hi Rich,

To be able to test your scenario it would be helpful if you shared your table structure used in your Select relation element.

 

By: Michel Krohn-Dale 10 Feb 2020

RE: Select Relation - Hide columns

Michel,

I can export the tables and send them to you if that would be helpfull?

Here are the tables (and column types):

Cheers

Rich

By: Rich Hacker 10 Feb 2020

RE: Select Relation - Hide columns

Also, after playing around with this, I can confirm I only get the error if I ommit the following column:

column.0.displayField = y_installationheader.x_person_id
column.0.label = Person Id
column.0.operator = OperatorBeginsWith
column.0.searchField = y_installationheader.x_person_id

So I've managed to get rid of one of the columns, but I'm still stuck with the Person Id:

Any help would be greatly appreciated!

Cheers

Rich

 

 

By: Rich Hacker 10 Feb 2020

RE: Select Relation - Hide columns

Hi,

Would be helpful if you could send package with table structure. 

By: Michel Krohn-Dale 10 Feb 2020

RE: Select Relation - Hide columns

Michel,

I have sent it to community@superoffice.com, many thanks!

 

By: Rich Hacker 10 Feb 2020

RE: Select Relation - Hide columns

Hi Rich,

For me this looks like issue because first column you are trying to use is not belonging to y_installationheader table, meaning it does not fully know which table to use. Makes sense when you indicate that it works if you have y_installationheader.x_person_id in first column.

I changed your code a little to be, and this way it does not fail:

column.0.displayField = y_installationline.x_line_number
column.0.label = Line No
column.0.operator = OperatorBeginsWith
column.0.searchField = y_installationline.x_line_number
column.1.displayField = y_installationline.x_product.x_code
column.1.label = Code
column.1.operator = OperatorBeginsWith
column.1.searchField = y_installationline.x_product.x_code
column.2.displayField = y_installationline.x_product.x_description
column.2.label = Description
column.2.operator = OperatorBeginsWith
column.2.searchField = y_installationline.x_product.x_description
column.3.displayField = y_installationline.(y_serialnumber->x_installation_line).x_serial_number
column.3.label = Serial Number
column.3.operator = OperatorBeginsWith
column.3.searchField = y_installationline.(y_serialnumber->x_installation_line).x_serial_number
column.length = 4
By: Michel Krohn-Dale 11 Feb 2020