Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does 'IIF arcade expression' supports in Renderer? #1298

Open
illusian opened this issue Sep 25, 2023 · 1 comment
Open

Does 'IIF arcade expression' supports in Renderer? #1298

illusian opened this issue Sep 25, 2023 · 1 comment

Comments

@illusian
Copy link

illusian commented Sep 25, 2023

Hi,

I am currently working on to using IIF syntax arcade expression in renderer which is coming from JSON.
So far, I can confirm that simple "valueExpression" in the JSON works fine such as "valueExpression='$feature.category'". But, it won't accept more complicated arcade expression using IIF condition statement.

*valueExpression
var nV = IIF($feature.nV != null && $feature.nV != $feature.v, '-'+ $feature.nV,'');
var cS = IIF($feature.cS != null && $feature.cS != 'closed', '-'+ $feature.cS, '');
IIF(IsEmpty($feature.endDate), IIF($feature.category == 'brick', $feature.v + nV + cS, $feature.v), 'expired')

*sourceCode
var serializeOptions = new JsonSerializerOptions
{
WriteIndented = true,
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
};
string jsonRenderer = System.Text.Json.JsonSerializer.Serialize(uniqueRenderJSON[renderName], serializeOptions);
_renderer = Renderer.FromJson(jsonRenderer);
}
featureCollectionTable.Renderer = _renderer;

@pMaske
Copy link
Member

pMaske commented Aug 2, 2024

Can you please provide a simple reproducible sample app with such data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants