how to set default value to image control on form?
Dear team ,
I put an Image control on form , then set data source property to an entity , i defined parametric entity and put value for it from work portal .I set default value for Image control on form enter event in (Action Activity) , i used the following expression to set default value , but it does not work and image show anything.
1) Me.setXPath ("myProcess.myImage.picture.Data" , Me.getXPath("entity-list('myImage','idmyimage = 1')").getXPath("picture").getXPath("Data"));
2) Me.setXPath ("myProcess.myImage.picture" , Me.getXPath("entity-list('myImage','idmyimage = 1')").getXPath("picture"));
none of above options was not work for me , and image does not display,
please help , whats wrong?
Regarding your question, You can create a connection between a master entity and a parametric entity. The parametric entity holds the actual images. Then you can select the file through xpath Or you can also do what you need though SOA Layer.
Here is the XPath statement, where MasterEntity is the name of your Master Entity that has a related attribute connecting to the ParameterEntity (replace with the name of your ParameterEntity).
<MasterEntity.Image> = CHelper.getEntityAttrib("ParameterEntity","id+ParameterEntity", "Imagename = 'SomeNameofTheImage");
In this case the ParameterEntity has two attributes:
1)Image attribute that actually holds the image.
2) Imagename as an example so you can filter and get the appropriate image you need from the ParameterEntity.
You can then drag the Image attribute of Related attribute on the form to display the image.
Comments have been locked on this page!