Screen with DefaultConfiguration: adding new field that should be invisible (ColumnWidth=-100) is visible in client

I was trying to …

  1. In the model we have a screen with DefaultConfiguration property set.
    obrazek
  2. I added new field into screen section and set property ColumnWidth to -100
  3. The new field is not added into DefaultConfiguration.

I was expecting …

New field would not be displayed in any Table Configuration to any user where it is missing because it is set to -100 as default. So it should be added to user’s configuration as invisible and client should not display it.

Instead I’ve got …

New field is visible in client at the end of the screen section.

Workaround

Current workaround is to apply sql script to force remove configuration of the column and add new column as invisible to all configurations of all users:

DECLARE @formPanelId uniqueidentifier = 'd8fc8897-6c75-41b7-9e23-ff02d8782371'
-- smaže záznam sloupce, pokud by se vyskytl
update OrigamFormPanelConfig set SettingsData = replace(SettingsData, '<ColumnConfiguration propertyId="refConsolidatedCoachId" width="100" isVisible="true" />', '') where FormPanelId = @formPanelId
update OrigamFormPanelConfig set SettingsData = replace(SettingsData, '<ColumnConfiguration propertyId="refConsolidatedCoachId" width="100" isVisible="false" />', '') where FormPanelId = @formPanelId

-- vytvoří nový záznam sloupce jako neviditelný na konci TableConfiguration
update OrigamFormPanelConfig set SettingsData = replace(SettingsData, '</TableConfiguration>', '<ColumnConfiguration propertyId="refConsolidatedCoachId" width="100" isVisible="false" /></TableConfiguration>') where FormPanelId = @formPanelId

Additional notes

  1. If I tried to change new DefaultConfiguration, Reset column configuration in menu didn’t help to reload with new DefaultConfiguration. New field was also visible.
    obrazek
  2. To retest new DefaultConfiguration, I deleted the rows in database and then everything worked correctly:
    DELETE FROM OrigamFormPanelConfig WHERE FormPanelId = 'd8fc8897-6c75-41b7-9e23-ff02d8782371'
    

I cannot reproduce this. @david.pochobradsky can you reproduce the problem in origam\model-tests and create a pullrequest?

Default Configuration (see the Text1 field is missing):

<Configuration>
    <tableConfigurations>
        <TableConfiguration name="" fixedColumnCount="0" isActive="false" id="default" layout="Desktop">
            <ColumnConfiguration propertyId="Date1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Integer1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Currency1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Boolean1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Long1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Text2" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="TagInput" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="refTagInputSourceId" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="VirtualTest" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="TagInputSourceLabel" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="TagInputSourceLabel_DataStructure" width="224" isVisible="true" />
        </TableConfiguration>
        <TableConfiguration name="Text1 not filled" fixedColumnCount="0" isActive="true" id="aaaab62b-d501-4225-9fe1-44ba9f1aef1c" layout="Desktop">
            <ColumnConfiguration propertyId="Date1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Integer1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Currency1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Boolean1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Long1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Text2" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="TagInput" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="refTagInputSourceId" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="VirtualTest" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="TagInputSourceLabel" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="TagInputSourceLabel_DataStructure" width="224" isVisible="true" />
        </TableConfiguration>
        <TableConfiguration name="" fixedColumnCount="0" isActive="true" id="default" layout="Mobile">
            <ColumnConfiguration propertyId="Date1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Integer1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Currency1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Boolean1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Long1" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="Text2" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="TagInput" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="refTagInputSourceId" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="VirtualTest" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="TagInputSourceLabel" width="100" isVisible="true" />
            <ColumnConfiguration propertyId="TagInputSourceLabel_DataStructure" width="100" isVisible="true" />
        </TableConfiguration>
    </tableConfigurations>
    <customConfigurations />
    <defaultView>
        <view id="1" />
    </defaultView>
</Configuration>

Text1 field configuration on screen:

obrazek

In application, the field is visible:

selects for deleting or checking configuration:

select * from OrigamFormPanelConfig where FormPanelId = '82f28f18-0f65-4c9b-afa8-2335fddb654d'

delete from OrigamFormPanelConfig where FormPanelId = '82f28f18-0f65-4c9b-afa8-2335fddb654d'

@david.pochobradsky oprava je v masteru. Otestuj ji prosim

Potvrzuji, že v masteru funguje dle očekávání, díky!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.