Storing value of an attribute to another attribute
Hi All, I have an attribute named ‘Document Type’ of type enum with three values – Loss Report , Photos , Others The value of this attribute is then passed to a datagrid column, but , if Document Type is selected as ‘Others’ then a new field is visible with free text. In this case, the value of this free text has to be passed to the datagrid column. I was trying if I could change the object and set the value of Document Type to the value of Free text but could not do so, since Document Type is of type enum and Free text is of type string. Please if you could describe an approach to achieve this. Thanks,
Where did you store the free text? If it is in the same object you could use conditional visibility to show this field if the enum type is Others and hide it when it is not.
If this is not the sollution could you edit your post and add a screenshot on the page you are building?
At first 2 concept definitions
An enum-attribute can only contain the values as specified in the related enumlist
A datagrid column can only show a single attribute
So you cannot show the enum value or the free text(of an other attribute) in the same column.
Use a list view, which you give a grid look and feel using layoutgrids to create columns.
add 2 text widgets, one to display the enum value the other to display the freetext. Depending on enumvalue set the conditional visibility
Add a 3rd attribute where you duplicate the enum value (caption) as string or in case of “other” duplicate the free text value.
Use this 3rd attribute as datagrid column attribute