Jump to content
  • 0

Search by month


Kuroshi
 Share

Question

I'm trying to set-up the ability to search a report by month. This is for a combined chart and report. The table has three years worth of data, 2017, 2018, 2019. So I would like the user to be able to select "June" and the data for June is shown for each year. 
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Hi @Batchini
you can create a formula field in your table for Month and paste this code: Datepart(Month, [@field:Date]). Make sure to change the field name. And on your DataPage, select the Month field and set it to 'Dropdown'. You may refer to this screenshot: https://c0acs764.caspio.com/dp/ba4a60009a119570a12e4c478dc4/files/3294662

The return value of the formula that I have provided is 1 to 12. So if we are trying to get the Month we will use that 1-12 as the value.

Hope it works for you

-Barbie

Link to comment
Share on other sites

  • 0
4 hours ago, Batchini said:
I'm trying to set-up the ability to search a report by month. This is for a combined chart and report. The table has three years worth of data, 2017, 2018, 2019. So I would like the user to be able to select "June" and the data for June is shown for each year. 

That would depend on your Table design. If you have a separate table for Month, you can establish a one to many relationship to your main table which would be the Data source of your DataPage to generate reports. Then, in the configure field, you may use a Dropdown and choose look up table. Use the Month field on the display option and ID_field on the value. Please see this article for more information: https://howto.caspio.com/datapages/datapage-components/setting-up-default-values/

Link to comment
Share on other sites

  • 0

Hello!

There would be an easier than creating a dropdown for each month and year, i think that'll be a little tedious. 

When searching for a Month and Year, you can simply change the Precision inside the Search criteria of a Date Field. 

Here's a screenshot.

image.png.ab9c8513f13417b3798e0f1d4af0bb82.png

This way, even when you just put in any date, it will just get the Month and year (obviously).

 

I hope this helps. =) 

Regards,
Glitch

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...