Hi All,
I want to assign Local varible value when if Condition true like This
is It Possible ???
Thanks
hello,
you can do like this
I have a expression and in this expression I have if condition ( If condition is true than Assign value in local variable
My req is I have a expression and two local variable
1. date
2. position
In expression First Check If Condition(Date = CurrDate()) if condition is false simple print a text and if condition is true than
print a text and also assign a value to local variable like Position .
Is it Possible???
Instead of using expression you can use IF and insert that condition date=currdate().
On true side assign position=1 and the text variable you are using to print text with the text you want to print.
and on false side you can assign just a text variable with the text u want to print.
Ok But How to assign Local Varible Value in true Condidition
Not in widget tree
I m saying in the logic flow.
Can you tell me what is exactly what you want to achieve/exact requirement so that I can help you better.
I Have a If Condition on UI,
1. If Condition Is false than Print Text( Done)
2.If Condition is true
a. Print a text(Done)
b. I have a local variable like Position and we want to assign the value Like 1
This is my requirement
How to assign local variable value ????
please read the replies people are giving you,
this is not something to be done in an expression on your ui, it is something to be done in an action flow.
Hello @Md Mansur
check attached oml.
Regards,
Pramod.
Hi @Md Mansur ,
dont use this type assignment use like below image-
hope this will help you.
Please check this??
Hi @Md Mansur
Can you please look at the below OML, If you need something like this, I did some work around using JS for your use case.
https://saravanan-gamechanger.outsystemscloud.com/RememberMe/LocalAssign?_ts=637952263724422508
I hope this helps!
Saravanan Santhanam.
Hi MD Mansur ,
If understood you correct, you have input on the screen and expression is also on the screen,
then on change of the input you give , on change action In the on change event flow you can assign values as per you requirement,
on expression you can give,
if(date=currdate(), position , Not current value)
You can mark this post as solution if it helps you,
Shehroze khan
Hi MD,
It seems you are thinking as if you are programming JavaScript, with Console.Write() and whatnot. This is not how OutSystems works! Showing/hiding text on a screen is done by using an If widget on the screen, that is triggered by some condition. Setting a variable to a certain value is done by using an If node on the logic canvas, combined with an Assign node.
If you want to show a certain Text on screen, and assign a variable at the same time, you have to use an If node, and an assign of that variable, and possibly an assign of a second variable that's used in the condition in the If on the screen (only when the condition can't be directly derived from the variable).
On the screen:
Condition properties:
In your logic: