If statement in assign without else

Hey there!

According to this post, all fit, but is it possible to do just if-then in assign? Without else.
Thanks

@Slavich

By VB.Net defalt, you have to give Else part, IF you don’t have else part just place “” only

but else is required

Check below IF operator syntax

if(counter="Srini","YES","")

Mark as solution if this helps

Thanks

2 Likes

Lets say: var=if(counter=“Srini”,“YES”,“”)
In this case of else I will receive var = ". And I want to escape this.
That’s why I’m asking how to apply only if-else… If it is possible?

@Slavich

Yes, but that is the default one, we can’t escape that…

Hope this helps

Thanks

1 Like

Got it , thank you!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.