Skip to Content
0
Mar 09, 2020 at 12:08 PM

Descriptive text replacing a code in a smartTable

863 Views

Hi.

I have the following scenario.

A smartTable with two fields, one for the code and one for its description.

What I want to represent is a single field with the description that will later become a drop-down with different options defined by its code.

I want to get something like this, but only using annotations.

I know that within the SmartTable I can define a table with Smartfields to get it, but it is not what I am looking for, it has to work by annotations.

What I have is the following:

This is my SmartTable:

In the metadata we receive this:

And in the annotations we have declared the LineItems and for the code field the dropdown.

Getting the following functionality:

Reading Mode:

Edit Mode:

But here I have two problems.

In read mode, the code is represented, not its description.

In Edit mode, your displayBehavior shows the description and code, but I just want the description.

How can I get this?, just by annotations.