Skip to content

Condition and Arguments seem not to be same evaluated #188

Answered by axunonb
dev-ivan-markovic asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Ivan
From the format string it's hard to figure out, what you would like to achieve: What does True or False in terms of the OrderNumbermean? I guess you would like to use the ChooseFormatter or the ConditionalFormatter. Did you take a look at the samples in the Wiki?
If you change your example to

var result = Smart.Format("TEST: {OrderNumber:choose(Test214):{}|other number}", parsed);

you will get "other number" in the ouput, if the OrderNumber is not "Test214".
Hope this helps to get started.

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@dev-ivan-markovic
Comment options

@axunonb
Comment options

@dev-ivan-markovic
Comment options

@axunonb
Comment options

@dev-ivan-markovic
Comment options

Answer selected by axunonb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants