Bind DataProvider of DropDownBox from SessionVar

Hello, greetings to everyone!

Does anybody know whether there is a possibility in mappView to bind a DataProvider to SessionVar?

According to Automation Help datatype of DataProvider is ItemCollection. But if I want to create a SessionVar of this type I get this error:

18	Error	08.01.2024 12:18:56,0230	This is an invalid xsi:type 'http://www.br-automation.com/iat2015/session/engineering/v1:ItemCollection'., XML syntax error. The object cannot be loaded.		Ln:32, Col:4	D:\AS\Projekte\TestProject\Logical\mappView\Visualizazion\Variables\Vars.svar

Syntax of SessionVar:

<Variable name="DataProvider_A" xsi:type="ItemCollection" value="[{'value':'0','text':'AAAA'},{'value':'1','text':'BBB'}]" />

Is there a possibility to create a string array or something similar?

Background: I want to replace DataProvider dynamically via ListBinding.

Many thanks in advance for your help and ideas. :slight_smile:
Simon

@Simon_Stoll
have you tried using just STRING?

I did and while you can’t select the variable type thru the binding wizard it seems to be working with a manually created binding.

Session var:

<Variable name="Variable3" xsi:type="ANY_STRING" value="[{'value':'0','text':'AAAA'},{'value':'1','text':'BBB'}]" />

Binding:

	<Binding mode="twoWay">
		<Source xsi:type="session" refId="Variable3" attribute="value" />
		<Target xsi:type="brease" contentRefId="TestContent" widgetRefId="DropDownBox1" attribute="dataProvider" />
	</Binding>

image

1 Like

Hey Marcel,

works perfect. Thank you so much!!

Only issue is that ANY_STRING isn’t available for DataProvider in content editor. But I can work with this.

Greetings Simon

Awesome, good to hear it works for you as well.

We’ll share that topic with the proper channels so it can be addressed in the future.

Take care and enjoy the community!

2 Likes

I think it is possible.