cancel
Showing results for 
Search instead for 
Did you mean: 

Cell variant in table column

Former Member
0 Kudos

Dear experts,

I have a simple table element with a column that contains a cell variant for a dropdown list.  This is a dynamic table and the cell variant is set for the 3rd column based on the field value in the 1st column. Only the first row will contain the cell variant in the 3rd column.  For all other rows, an input field in the cell is used for free text entry.  See table below.

I have set the cell variant accordingly for the dropdown list in the first row and this works fine.  For the other rows, I have cleared the variant value (for selectedcellvariant) and expect that free text input will work as it takes on the columns celleditor properties.  However, after inputting some values in the 3rd column and attempting to save, I get this error for the value input in row 2, column 3 - "The entered value is not in the list of valid values".  No variant is bound to this cell so please shed some light on this.  Thanks.

value 1some other valueDropdown list for characteristic value (bound to cell variant)
value 2some other valueFree text (variant value is cleared)
value 3some other valueFree text (variant value is cleared)

Accepted Solutions (1)

Accepted Solutions (1)

ramakrishnappa
Active Contributor
0 Kudos

Hi Pat,

I suspect, the issue is with context attribute binding to the editors i.e. the same context attribute is bound to both dropdown list and input field in column 3. Hence when you enter free text, the value is not found in the drop down list the attribute is already has.

Please bind the dropdown list & input field elements to separate attributes. i.e. bind ATTRIBUTE1 to dropdown list editor and ATTRIBUTE2 to input field ( free text ).

Hope this should resolve your issue.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

Thanks for your reply.  Yes, it is bound to the same context attribute but this is what I want.  I believe this can be done.

From the online help for selectedcellvariant:

Determines the active table cell variants for a table cell. The variant whose variantKey matches the selectedCellVariant is used. If the value is set to initial, no cell variant is used, instead the properties of the table column itself and its TableCellEditor are used. An invalid selectedCellVariant is not allowed.


My context contains an attribute for the selectedCellVariant and this is set for the dropdown values in the cell for the first row.  For all other rows, it is cleared.

ramakrishnappa
Active Contributor
0 Kudos

Hi Pat,

Sorry,It wont work when you have drop down list set to attribute

I mean, cell variant replaces cell editor with the given ui elements but here the issue is when we have a dropdown list values set for an attribute, it will not accept any other values as input.

Hence, it is very much required to bind other cell editor ( input field - in your case ) to separate ATTRIBUTE, let it store data as below

Now, you can arrange data as you want through program.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

Thanks for the explanation.  I'd still like to have just one column.  I'm just wondering if there is a workaround like adding the free text value input to the list of values before the validation occurs? 

ramakrishnappa
Active Contributor
0 Kudos

Pat Govender wrote:

I'd still like to have just one column.  I'm just wondering if there is a workaround like adding the free text value input to the list of values before the validation occurs?

Well, the workaround solution is to use DropDownListByIndex ( DDBI ) ui element instead of DropDownByKey(DDBK).

Because, if you use DDBK, you need to set the drop down list values to context attribute.

If you use DDBI, you can bind the property 'TEXTS' to other node where you can have the dropdown list maintained.

Hence, there is no context attribute level, value set. so no validation errors thown.

Please follow the below steps:


  • Create a cell variant with ui element DDBI
  • Create a node DD_VALUES ( cardinality 0...n ) and populate the drop down list values to internal table and bind it to context node DD_VALUES
  • Bind the property TEXT of DDBI to context node DD_VALUES

Now, when you have a variant key mentioned, it chooses DDBI else, free text ui element is shown.

Hope this workaraound solution resolves your issue.

Regards,

Rama

Former Member
0 Kudos

Hi Rama,

Thank you kindly for your assistance.  I have implemented your earlier suggestion with having a separate column for the dropdown list.  I have scenarios where multiple dropdowns (with different value sets) should be available in the same column so this seemed the best way to accomplish that.

Take care and best wishes.

Pat

Answers (0)