Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, Can we set a clear state on a button the action behind that button action behind that button is to select current month out of all the months.
Suppose I'm hitting clear button so this month its should go on Oct next month it should go on Nov.
Currently what is happening it is storing this month(Oct) when i'm setting the clear state where as next month also it is Oct only...i want something where it selects dynamic selection(Oct this month Nove next), instead of static (Stores Oct) only.
then you need to do the following steps
1) provide a short macro: (press strg+M)
Sub DefineClearState
ActiveDocument.SetClearState
End Sub
2) define a Trigger on your sheet with Action run macro and define macro "DefineClearState"
Here is the dead end , i can not use macro n all....
then try this:
- unselect month, quarter etc.
- use Trigger as mentioned in my Image on open document
- save doc
- when you open it will select latest quarter. if you Change to other quarter and press "clear" the latest quarter will be selected again
i tried the way you are telling, its going to 2nd qtr only..
curious, when I follow your instructions Step1 and 2 I see quarter 3 after clear button???
upps, not allowed to upload
How i'm doing do the step 1, set the clear state on max qtr(which is 2 in this case), now follow the step 3 reload the doc, when you open 3rd qtr will be selected now select any month in (4,5,6) hit clear it will go to 2nd qtr only..
I have setup trigger on open max({1}Qtr)
see attached app, when I follow your steps I get correct result
Strange...where is the attached app?
Hi Amit,
Load a Quarter field with the following script.
'Q'&(FLOOR(NUM(MONTH(date Filed from DB)-1)/3)+1) AS Quarter,
and then in front end On clear Button set action
Select In Field-->Quarter
and in search string give this --> ='Q'&(FLOOR(NUM(MONTH(max(date Filed from DB))-1)/3)+1)
It will select the latest quarter in Quarter field based on Date field from DB.
I already have quarter codes there like 2015Q4 and 2016Q1, whit this data value i'm deriving the current qtr and previous qtr from that(using set analysis)..now I have to take max of it?