Hello,
I am using a component as my menu and I have the menu items set to load the CustomNavigation.
I've build my menu in my App's Formula's so I can easily load the same menu on all my different pages.
My App Formula's looks like this:
CustomNavigation = Table (
{
MenuName: "Item 1",
MenuID: 7,
PageNavigation: Screen1
},
{
MenuName: "Item 2",
MenuID: 8,
PageNavigation: Screen2
}
)
For the first menu item "Item 1" it navigates to Screen1, but for Item 2 I want it to navigate to an external website.
Usually you can do this using the Launch() function, but that doesn't seem to work in my case.
As a workaround I've made it so that it goes to Screen2. Then on Screen2 I run a timer set to 1 sec to launch to the external site and navigate back to my home screen.
This works, but I'm looking for a better solution since I don't like it.
What I want, is to update the App's Formula to something like this:
CustomNavigation = Table (
{
MenuName: "Item 2",
MenuID: 8,
PageNavigation: Launch("https://www.example.com")
}
)
This doesn't work. I get an error (screenshot attached) saying: "Behavior function in a non-behavior property. You can't use this property to change values elsewhere in the app"
How can I easily make this work? All I want is to update my PageNavigation to launch the external website directly from the menu. I don't link to my current workaround to navigate to another screen with a timer to redirect back to my home screen and to launch the external site on timerend.