Hello
I have two 'filter' buttons on a List Page "All Orders" & "My Orders" and I want only one button to display at a time.
The Page initially Opens showing all Orders and, therefore the "My Orders" Action button is visible.
The "All Orders" button Visible property has a variable - AllOrdersVisible
The "My Orders" button Visible property has a variable - MyOrdersVisible
We have a ToggleVisibleButtons function:
LOCAL ToggleVisibleButtons()
AllOrdersVisible := MyOrdersVisible;
MyOrdersVisible := NOT AllOrdersVisible;
ToggleVisibleButtons() is called when the Page Opens and each time one of the Filter Action buttons is pressed.
Now for the problem:
When the "All Orders" filter button is pressed, the behaviour is as you would expect - the list page displays all records and the "My Orders" filter button is shown and the "All Orders" filter button is hidden.
BUT.....When the "My Orders" filter button is pressed, the list page displays My records BUT the "My Orders" filter button is still shown and the "All Orders" filter button remains hidden. If I click the "My Orders" button again, you then get the behaviour you would expect.
Any ideas why I have to press the "My Orders" button twice?
Many Thanks
I have two 'filter' buttons on a List Page "All Orders" & "My Orders" and I want only one button to display at a time.
The Page initially Opens showing all Orders and, therefore the "My Orders" Action button is visible.
The "All Orders" button Visible property has a variable - AllOrdersVisible
The "My Orders" button Visible property has a variable - MyOrdersVisible
We have a ToggleVisibleButtons function:
LOCAL ToggleVisibleButtons()
AllOrdersVisible := MyOrdersVisible;
MyOrdersVisible := NOT AllOrdersVisible;
ToggleVisibleButtons() is called when the Page Opens and each time one of the Filter Action buttons is pressed.
Now for the problem:
When the "All Orders" filter button is pressed, the behaviour is as you would expect - the list page displays all records and the "My Orders" filter button is shown and the "All Orders" filter button is hidden.
BUT.....When the "My Orders" filter button is pressed, the list page displays My records BUT the "My Orders" filter button is still shown and the "All Orders" filter button remains hidden. If I click the "My Orders" button again, you then get the behaviour you would expect.
Any ideas why I have to press the "My Orders" button twice?
Many Thanks