2025 Feb 20 10:51 AM - edited 2025 Feb 20 10:53 AM
Hi,
I created a SmartTable that takes data from a simple JSON model instead of an oData service. This is possible as you can see from here.
The table has many columns (I won't list them all for convenience), so I would like to display only some of them in the beginning. I tried to use the initiallyVisibleFields property by inserting the name of the data as it is written in the JSON model (and also as I recall it in the items), but when I go to test all the columns are still visible.
All data is shown correctly in the rows.
What am I doing wrong?
<st:SmartTable
entitySet="BPSet"
tableBindingPath="BPModel>/"
header="{i18n>contractsList}"
showRowCount="true"
tableType="Table"
showFullScreenButton="false"
useVariantManagement="false"
enableAutoBinding="true"
enableExport="true"
useTablePersonalisation="true"
initiallyVisibleFields="Ebeln,Name1"
>
<st:customToolbar>
<m:OverflowToolbar design="Transparent">
<m:ToolbarSpacer />
<m:Button
id="ButtonFilter"
type="Emphasized"
icon="sap-icon://filter"
text="{i18n>contractsAllowed}"
width="auto"
enabled="true"
iconDensityAware="false"
press="contractsAllowedFilter"
/>
<m:Button
id="ButtonRefresh"
type="Emphasized"
text="{i18n>refresh}"
tooltip="{i18n>refresh}"
press="getRunItems"
icon="sap-icon://refresh"
/>
<m:Button
id="ButtonTacitRenewal"
type="Emphasized"
text="{i18n>tacitRenewal}"
tooltip="{i18n>tacitRenewal}"
width="auto"
enabled="true"
iconDensityAware="false"
press="onTacitRenewal"
/>
<m:ToolbarSpacer />
</m:OverflowToolbar>
</st:customToolbar>
<m:Table
id="detailContractsTable"
mode="MultiSelect"
itemPress="toListaDoc"
>
<m:columns>
<m:Column>
<m:customData>
<core:CustomData
key="p13nData"
value='{"columnKey": "Ebeln", "leadingProperty": "Ebeln"}'
/>
</m:customData>
<m:Text text="{i18n>ContractId}" />
</m:Column>
<m:Column>
<m:customData>
<core:CustomData
key="p13nData"
value='{"columnKey": "Name1", "leadingProperty": "Name1"}'
/>
</m:customData>
<m:Text text="{i18n>Name}" />
</m:Column>
<m:Column>
<m:customData>
<core:CustomData
key="p13nData"
value='{"columnKey": "createdAt", "leadingProperty": "createdAt"}'
/>
</m:customData>
<m:Text text="{i18n>creationDate}" />
</m:Column>
<m:Column>
<m:customData>
<core:CustomData
key="p13nData"
value='{"columnKey": "createdBy", "leadingProperty": "createdBy"}'
/>
</m:customData>
<m:Text text="{i18n>createdBy}" />
</m:Column>
<m:Column>
<m:customData>
<core:CustomData
key="p13nData"
value='{"columnKey": "modifiedAt", "leadingProperty": "modifiedAt"}'
/>
</m:customData>
<m:Text text="{i18n>modifiedAt}" />
</m:Column>
<m:Column>
<m:customData>
<core:CustomData
key="p13nData"
value='{"columnKey": "modifiedBy", "leadingProperty": "modifiedBy"}'
/>
</m:customData>
<m:Text text="{i18n>modifiedBy}" />
</m:Column>
<m:Column>
<m:customData>
<core:CustomData
key="p13nData"
value='{"columnKey": "Status", "leadingProperty": "Status"}'
/>
</m:customData>
<m:Text text="{i18n>status}" />
</m:Column>
</m:columns>
<m:items>
<m:ColumnListItem
type="Navigation"
press="onPress"
>
<m:cells>
<m:Text text="{BPModel>Ebeln}" />
<m:Text text="{BPModel>Name1}" />
<m:Text text="{BPModel>createdAt}" />
<m:Text text="{BPModel>createdBy}" />
<m:Text text="{BPModel>modifiedAt}" />
<m:Text text="{BPModel>modifiedBy}" />
<m:Text text="{BPModel>Status}" />
</m:cells>
</m:ColumnListItem>
</m:items>
</m:Table>
</st:SmartTable>
Request clarification before answering.
it is not supported. please forget it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.