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
0
Answers
Kishorm....have checked and it's not being called twice.
Thanks
So it's something to do with the fact that I do not have any records...but the ToggleVisibleButtons() is called still called after my empty data set is displayed (I have also tried calling the ToggleVisibleButtons() function before the filter is applied...same result).
Thanks
What NAV version are you using?
Can you reproduce this behavior in a Cronus database? If so, export the modified page as text file (from the Cronus database) and share it.
It is easier for us to try and find out what's going on.
Regards