Template canvas, dataset in parameters?

I’m looking how to pass a dataset in the parameters of a template canvas.
Not sure it’s possible ?

dictionnary parameters :

{'enum': Dataset [3R ? 2C], 'tagPath': u'[default]TEST/00001/TC/OUVERT', 'designation': u'Commande ouverture'}

system.util.jsonEncode(parameters) :

{"tagPath":"[default]TEST/00001/TC/OUVERT","designation":"Commande ouverture","enum":{"data":[["0","1","2"],["FERME","OUVERT","AUTRE"]],"columnNames":["Value","Label"],"bulkQualityCodes":null,"columnTypes":["class java.lang.String","class java.lang.String"],"asXML":"H4sIAAAAAAAAALOxr8jNUShLLSrOzM+zVTLUM1BSSM1Lzk/JzEu3VQoNcdO1ULK34+WySSm2s0nO\nz7GzSbEzsNFPAdGGUNoITOuDZaFK3FyDfF2h0v6hYa5BIVCOY2hIkCuSen2guQCTZnEnhAAAAA==","rowCount":3,"columnCount":2}}

lead to the following error :
08:47:51.208 [AWT-EventQueue-0] WARN Vision.TemplateCanvas - Unable to set template property value on template [default]TEST/00001/TC/OUVERT

You can pass it in through the initializeTemplate extension function.

template.enum = self.parent.getComponent('Power Table').data

3 Likes

Ok thanks for the workaround