Reputation: 1
I am trying to use Navigate function, instead of a Screen Name, I tried to get it from a vairaible, but It says The specified property is not accessible in this context, the code looks like this Set(ScrnNm,ListEntries1_1.Selected.Label1_1.Text);Navigate(ScrnNm,ScreenTransition.None), it is attached to the 'OnSelect' property of a button on a first screen, ListEntries1_1 (gallery name on first screen).Selected.Label1_1 (Gallery values from a backend Table).Text Kindly help, Thanks
Upvotes: -1
Views: 856
Reputation: 87228
You cannot use a text variable to navigate to a screen - you need to use the screen reference itself. One option is to use a Switch statement that would check the value of your label, similar to the example below:
Set(
screenToNavigate,
Switch(
ListEntries_1.1.Selected.Label1_1.Text,
"Screen1", Screen1,
"Screen2", Screen2,
"Screen3", Screen3));
Navigate(screenToNavigate, ScreenTransition.None)
Upvotes: 1