cancel
Showing results for 
Search instead for 
Did you mean: 

RAP: How to display text instead of guid in value help?

boolan79
Explorer
0 Kudos
319

Hello,

I have the following problem with value help in managed scenario.

In my app I want to create an object of the Model (car model) entity, which references another entity Make.

Therefore I need to pass the GUID of selected Make:

boolan79_1-1726848197430.png

On the screen for model creation I only want to present the text value of the entry selected in value help (TOYOTA), not the key value (guid). The GUID of the car make I would like to hide from the user, but of course to pass it for object creation.

How can I achieve it?

Is there a way to make the field for Make editable and to hide the field for MakeId at the same time?

When I declare extra field for Make in the behavior definition, then I am required to create this field in the draft table, which would lead to data redundancy.

Here is the value help definition, but it only work on the MakeId field:

boolan79_2-1726848609278.png

 

 

 

boolan79
Explorer
0 Kudos

Meanwhile I have managed to _PARTLY_ solve this problem.

I have created a value help view for the MakeId field which also references the text field Make:

boolan79_0-1727023625216.png

The help view looks as follows:

boolan79_1-1727023664201.png

..with the result:

boolan79_2-1727023707332.png

It would be nice to get rid of the GUID in the display, any ideas?

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos
@ui.textArrangement: #TEXT_ONLY
MakeId

in your root view

boolan79
Explorer
0 Kudos
No, it does not change anything. The GUID is still displayed in brackets behind the text.
junwu
Active Contributor
0 Kudos
show me your changed code
boolan79
Explorer
0 Kudos

@junwu

here is the root consumption view for the entity Model:

boolan79_0-1727099487539.png

Maybe this annotation works only with OData 4.0, I am using 2.0 at the moment..

junwu
Active Contributor
0 Kudos
can you check the annoation is generated correctly in your metadata from your browser dev tool?
boolan79
Explorer
0 Kudos

>>> SOLUTION HERE <<<

Finally I was able to find the solution which works in both cases: OData 2.0 and 4.0.

boolan79_1-1727175063820.png

 

This is how the root view should be annotated (all annotations are necessary) to display descriptions instead of UUIDs:

boolan79_0-1727174722078.png

With best regards,

Chris

Answers (0)