Page screen in order

Jamo

New member
Have a page screen show all that will appear in the menu and have it sorted by the order they will appear so it is easy to move them around, and auto update the numbers as the forms configurator does when you change a number.
 
Upvote 2

abraun

Member
I believe Eugenio has it in his road map to make the Pages tab easier to manage to arrange the menu. Right now we have a stored procedure that we run to do this for us based on the Parent, here is the code we use, the case statement in the middle is where we increment our parent groups, you have to manually add them for the time being, and everything else gets put at 5000. Then in the next query, we add the row number to the parent order to generate the unique number. Then we update the dadabik_table_list with the new numbers.

select
menu_parent_table
,menu_order_table
,name_table
,alias_table
,case menu_parent_table when 'Acct' then 100
when 'Admin' then 6000
when 'Bids' then 200
when 'Detention' then 300
when 'Displays' then 500


else 5000
end as ParentOrder

into #ParentOrder
from dadabik_table_list
order by
menu_parent_table
,menu_order_table


select
*
,ParentOrder + ROW_NUMBER () OVER (partition by ParentOrder order by ParentOrder, alias_table) RowNum
into #ParentOrder2
from #ParentOrder




update t1
set menu_order_table=RowNum
from dadabik_table_list t1
left join #ParentOrder2 t2 on t1.name_table=t2.name_table
 
Top