cancel
Showing results for 
Search instead for 
Did you mean: 

Smart Table - Field selection by default

GowthamRaja
Participant
0 Kudos

Hi Experts,

I am working on smart tables. In the detail page i could able to view columns only with data type "Edm.String"

but i also have columns with "Edm.DateTime" which is not showing by default as shown below.

Every time i have to select manually to display as shown below,

Now i could able to view the details.

Instead of showing all the columns, i have to display few fields irrespective of data type.

Metadata.xml

<Property Name="RiskValidFrom" Type="Edm.DateTime" sap:display-format="Date"

  sap:label="Risk Valid From" sap:creatable="false" sap:updatable="false"

  sap:sortable="true" sap:required-in-filter="true" />

  <Property Name="RiskValidTo" Type="Edm.DateTime" sap:label="Risk Valid To"

  sap:creatable="false" sap:updatable="false" sap:sortable="true" sap:display-format="Date"

  sap:required-in-filter="true" />

<Property Name="ControlValidFrom" Type="Edm.DateTime" sap:display-format="Date"

  sap:label="Control Valid From" sap:creatable="false" sap:updatable="false"

  sap:sortable="true" sap:required-in-filter="true" />

<Property Name="ControlValidTo" Type="Edm.DateTime" sap:label="Control Valid To"

  sap:creatable="false" sap:updatable="false" sap:sortable="true" sap:display-format="Date"

  sap:required-in-filter="true" />

Annotation

<Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="RiskValidFrom" />

  </Record>

  <Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="RiskValidTo" />

  </Record>

<Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="ControlValidFrom" />

  </Record>

  <Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="ControlValidTo" />

  </Record>

Please help to resolve this.

Thanks,

Gowtham

Accepted Solutions (1)

Accepted Solutions (1)

GowthamRaja
Participant
0 Kudos

Hi All,

I am closing this thread as i got the solution mentioned below.

  <Record Type="com.sap.vocabularies.UI.v1.DataField">

  <PropertyValue Property="Date" Path="ControlValidTo" />

  </Record>

In annotation area i have changed the property as 'value' instead of 'Date'.

This is working fine now

Answers (0)