I'm not sure what you are requesting.
You show the menu that's standard for a column header while your layout is in Table View.
Do you want to see/use this menu in another part of the layout?
In another view such as list view?
Or do you want to add additional items to this menu? If so, what items specifically?
Yes, I have list view. And I have my column header which is a button and enabled sorting by script. I would like to include more options, by pull down menu, for each column header button. Of course, each button will have different pull down menu.
You can get some of this, but many of these options cannot be accomplished in a script (defining fields, adding groups etc.) like you can in Table View. You can place a text field at the top of each column and format it with a drop down list of values. A script trigger (Filemaker 10 and 11 only) can then be set to perform a script OnObjectExit to perform the task selected in the drop down. The script can then clear the field to keep it empty and invisible, if you wish so that you can place it on top of your layout text that labels the column.
You also cannot implement the sub menus shown in your screen shot. That's not something FileMaker can do. You'll either have to include the options of the sub menus in the single value list or use two drop down menus with the second list set up as a conditional value list to display the sub menu values consistent with the value selected in the first menu.
That leaves you with sort options and hide field as the only options you can script. (And hiding a field in a List View layout won't result in the columns sliding left to fill in the emty space--at least in browse mode--like it works in a table view.)
OK, I got it. Thank you. I need simple feature only. Of course, no sub-menu.
One more question, can I sort and/or filter portal row when I implement this sub menu above portal row? I setup filter and sort when I created portal row and I would like to sort and/or filter it when user need different sorting or filtering.
You can only dynamically filter the records of the layout's records. Portal's have fixed sort orders only.
There are several rather tortuous work arounds that simulate sorting the portal, but they take either multiple layouts or tabs in a tab control-each with a different sort order specified with the portal, or you sort on a calculaiton field that returns the values of different portal fields based on an option you select in a global field or by using a script to modify a global variable.
Since different data types sort by different rules, getting a calculation field to work this way takes some careful design to get it to work.