Your only available content to use in this setup is the Orderline. So you have the option to extend entity Orderline with attributes Color1 to Color4, but that is not a nice solution and polluting your data with layout-attributes.
So next option is using a wrapper. Same as with setting ‘Personal settings’. Create an entity having those 4 attributes and give the user the option to set them somewhere. Then create a dataview, retrieving this object. In the dataview add your Orderline-DataGrid2. Now the ‘ Available variables’ will look like this:
where $dataView1 will hold your object with Color1 to Color4 attributes and your $currentObject will still be your Orderline. The expression will look something like this:
if($dataView1/Color1='#FF0000') then 'red' else ''
Good luck!
Hi Tim,
First of all thank you for you answer. You have always good advices :)
i dit it like you said and the Variable is here. thats fine but in the Expression i dont know how the use the Color, from the User.
this works → if $currentObject/State = OrderManagement.OrderLineState._New then 'text-danger'
but it should be something like this →
if $currentObject/State = OrderManagement.OrderLineState._New then color: OrderManagment.ColorPicker_New
OrderManagment.ColorPicker_New = The choosen color from the User