Hi Olu,
Its a bit fiddly, and not playing ball with NT, my first suggestion is just do it with a button, that will be easy, but if you wanna play hard ball here is the outline:
You need to create the Header yourself.
The header will need an icon its just a image, well actually its either an unchecked image or a checked image. This isn't a normal NT field, since you are sticking it in a header. So you'll need a session variable to remember if its ticked or unticked. You'll need to chose the correct image based on the session value.
MyOnClick = 'sv('''',''myPage_myPageParent'','''',''_refresh_=current'',''action=toggleTag'','''',''_parentproc_=myPageParent'');'
MyCrazyHeader = '<div onClick="'&CLIP(MyOnClick)&'"><img src="'&CHOOSE(p_web.GSV('TaggedOrNot')='','unchecked.png','checked.png')&'" /></div>'
MyCrazyHeader is the field you will use for the Header, you'll need to check XHTML and unsafe XHTML for the header.
If your page has a parent page then you'll need the above syntax, if not try this:
MyOnClick = 'sv('''',''myPage'','''',''_refresh_=current'',''action=toggleTag'','''','''');'
What this will do is call you page when the image is ticked, nothing else...
However you can check for the action in GetValue like below:
IF p_web.GetValue('action') = 'toggleTag'
IF p_web.GSV('TaggedOrNot') = ''
!currently not tagged
!tag all my records here
p_web.SSV(TaggedOrNot',1)
ELSE
!currently tagged
!untag everything
p_web.SSV(TaggedOrNot',1)
.
.This needs to go into an embed point, probably top of GenerateBrowse or similar (needs to be pretty early on)
Thats the basic outline, probably errors in my code, but thats the basic idea.
I'm guessing that makes the Standard Button look pretty attractive now
Regards
Bill