Retrieve values from microflow for pluggable widget

0
I am developing a pluggable widget that will be getting data from a microflow. My current approach is to use the “useEffect” React function to check on the value of “props.data.status”, if if that is “available”, then I attempt to get the data I need from that object. If I inspect that object in the debugger I can see the data under props.data.items However, props.data.items[0].Symbol is “undefined”, which means I cannot get to the “attributes. How do I get the data returned from a microflow? Thanks Peter
asked
1 answers
1

Hi Peter,

If you use a data source with pluggable widgets you should use

const attributeValue = this.props.myDataSource.myAttributeOnDatasource(this.props.myDataSource.items[0]);
TypeScript

https://docs.mendix.com/apidocs-mxsdk/apidocs/client-apis-for-pluggable-widgets#listattributevalue

Sample https://github.com/mendix/widgets-resources/blob/1d723d4ee522952a40045248f95d07adb2009db9/packages/pluggableWidgets/maps-web/src/utils/data.ts#L18 

Cheers, 

Andries

answered