Hello,
I am trying to build a widget that will use two or more fields from a single data source.
I've cloned the use-expression widget from Esri's Github
https://github.com/Esri/arcgis-experience-builder-sdk-resources/tree/master/widgets/use-expression
Here's the issue I'm running into. When I try to use two fields in the expression, I get an Invalid Expression error:
If I could solve this error and use more than one field in the Expression builder, I could parse it out in the Widget.tsx file. However, that isn't working for me so I've been trying another approach.
In the API reference, there appears to be a MultipleExpressionResolveResults object.
https://developers.arcgis.com/experience-builder/api-reference/jimu-core/MultipleExpressionResolveRe...
This appears to be related to the ExpressionResolverComponent.
https://developers.arcgis.com/experience-builder/storybook/?path=/docs/components-jimu-core-expressi...
However, in this solution, I cannot combine the individual expressions into an IMExpressionMap to pass into the ExpressionResolverComponent.
Any help and/or examples of using multiple expressions/fields in a widget would be much appreciated. I can provide my code or snippets on request. Thanks!
Hi @JohnPhillipsGeo ,
For different parts of the expressions, you need to use the "+" to combine the results into one string, something like.