cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the label of search field?

friendlycoder
Participant
0 Kudos

Hi All

I've created a consumer CDS view that looks as follow:

define root view entity Yxxxxx_C_xxxxxx
  as projection on Yxxxxx_I_xxxxxx
{
      @UI: {
        lineItem:   [ { position: 10, importance: #HIGH } ]
      }
      @Search.defaultSearchElement: true
  key company_code_old    as CompanyCode,
      @UI: {
        lineItem:       [ { position: 20, importance: #MEDIUM, label: 'Valid from' } ],
        selectionField: [ { position: 20} ]
      }
  key valid_from          as ValidFrom,
      @UI: {
        lineItem:       [ { position: 30, importance: #MEDIUM, label: 'Valid to' } ],
        selectionField: [ { position: 30 } ]
      }
  key valid_to            as ValidTo,
      @UI: {
        lineItem:       [ { position: 40, importance: #MEDIUM, label: 'Local business type' } ],
        selectionField: [ { position: 40 } ]
      }
  key local_business_type as LocalBusinessType,
      @UI: {
        lineItem:       [ { position: 50, importance: #MEDIUM, label: 'Account from' } ],
        selectionField: [ { position: 50 } ]
      }
  key account_from        as AccountFrom,
      @UI:
      {
        lineItem:       [ { position: 60, importance: #MEDIUM, label: 'Account to' } ],
        selectionField: [ { position: 60 } ]
      }
  key account_to          as AccountTo,
      @UI: {
         lineItem:       [ { position: 70, importance: #MEDIUM, label: 'New Business' } ]
      }
      new_business        as NewBusiness
}

As you can see, it uses annotation to create the UI5 application.

The searchfield looks as follow:

How to change the label of the search field?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

maheshpalavalli
Active Contributor

Hi Anujit Marty

For SelectionField you need to use the below annotation

@EndUserText.label: 'Dummy Label'


Thanks,
Mahesh

cfortiniviana
Explorer
0 Kudos

Great!!! I did the same and it worked!!

Tks maheshkumar.palavallicapturar.

jpgcapturar2.jpg

Answers (0)