Hi Everyone,
I am trying to use the switch function, but it doesn't work as i want.
Do i use it wrong?
First i have a CAT entity to store the data
On the Cats screen it will show the CAT
When i Press "OK" Button I hope it can jump to Food Screen or Shop Screen.
So I use SWITCH to help me
I hope when i press OK it can get the current CATID, and switch can resolve where the CATID is 1 or 2 , Did I set the condition wrong?
THANKS.
Jorge Martins wrote:
You define an extra URL Attribute on your CAT entity:
When you create new instances of CAT, you will have to provide what is the Screen URL for that category (I don't know how you decide that, but for a web application likely you would have to set it to something like "/<your-module>/<your-screen>.aspx" (you can check what's the right URL for each screen from your browser's Location bar).
Then on your Button, you can set its Destination to an ExternalURL (one is defined for you on the Common UI Flow), and pass your CAT.URL as input to it:
Thank you so much ~
There are two different button for food and shop screen. You can use method of the button as navigate and then set your destination.
Example, when you click on the food ok button choose the method as navigate and set the destination Mainflow/Foods.
Hope this works for you!!!!
Priya Khade wrote:
Thanks Priya, I know the method you said, but i am trying a different way to do it.
In the future the CAT data will become more and more, so I wonder the switch function can help or not.
THanks
Hi Eva,
You haven't really explained what is the actual behaviour of your application there, what happens when you press each of those OK buttons?
But, a few considerations on what you are doing:
Concerning how you want to evolve your implementation to support a growing number of Cats:
Depending on your requirements, one possible approach could be for your CAT Entity to have an extra Attribute called URL, that you would fill with the Destination URL when you create a new record... when you display your Cats list, you use that URL as the destination of your Link/Button. That way, when you click on the Button you can navigate to the right place without any extra logic.
Thanks Jorge,
What I want to do is press OK it will enter the Switch (like the case statement)
CASE Food Enter the Food screen;
CASE Shop Enter the Shop screen
And i will try your suggestion.
Thanks
Hi Jorge,
For the last part,I am not quite understand ... I use the screen location as myURL?
Jorge Martins
HI Jorge, May I ask you about the URL as the destination of your Link/Button, I am not understand about it
Thank you