Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have filter named GasMonth and its in YYYY-MM format , am trying to add this filter selection in a button and which should pick previous month automatically. am giving all this actions to button and which will trigger once the app reloaded I have macro to trigger the button.
How can I select prev month using actions please help bit urgent.
tried field in selection option and used GasMonth field and coming to value : Date(Month(Today(GasMonth),-1),'YYYY-MM') and am getting 1900-01 instead of 2020-08
Ex : current month it has to select 2020-08 and next month it has to pick 2020-09..
Please help me thanks much..
@dhasharadh can you try below?
vMonth = date(addmonths(Today(),-1),'YYYY-MM')
I don't know if I understood correctly, but for example from your field GasMonth
for NextMonth you need ->
=Date(AddMonths(GasMonth,1),'YYYY-MM')
previous month:
=Date(AddMonths(GasMonth,-1),'YYYY-MM')
output :
Thanks Taoufiq for the quick response, my requirement here is button will trigger on reload with the help of a macro and button has to make few selections out of which this is one selection.
whenever we reload the app button has to make the GasMonth selection to Prev month which is 2020-08.
Hello,
For my understanding you are using macros in your applications throgh that you reload your application.
if its correct or wrong do following steps.
create one variable which month you required
eg: if you required current month
=max(month)
last month
=max(month) -1
now goto buttion actions select field selection
set u r field in value then
='$(variable)'
Surya Thanks for your time,
But tried below all but not picking the Month, am not sure what is wrong here. in that button am adding other actions like a bookmark and year(select in field) and a month.
for year this var expression working vYear = Year(Today()) (for variable value setting and for select in field using =$(vYear) and this is working fine.
For month we are using vMonth = Num(Month(Today()))-1 and in the text it is showing as 8 but in the filter it is not making the selection.
in the filter called gasMonth - values are in the form of 2020-08 , 2020-09
Please reply with your suggestions. Thanks Much
@dhasharadh can you try below?
vMonth = date(addmonths(Today(),-1),'YYYY-MM')
That is perfectly working. Thanks kush.
and while am exporting the chart data into a csv file, only few records are getting exported and there is a sorting issue as well.
the reason might be in the dashboard we have a Table Box with 8 columns and for exporting am only adding first column which might be leading to data mismatches (less number of records are getting exported) and also there is a sorting issue.
i have other plan but not sure on its possibility : can we export the entire tables box in excel and after exporting take out the first column and store it in the txt format which is our ultimate requirement.
can you please suggest with your thoughts.