Tap Forms Database Pro for Mac, iPhone, iPad and Apple Watch › Forums › Using Tap Forms 5 › Group Records by Week
- This topic has 8 replies, 3 voices, and was last updated 3 years, 6 months ago by
Prashant M.
-
AuthorPosts
-
November 30, 2021 at 9:05 PM #45877
Prashant MParticipantCurrently on iOS I’m able to group records Monthly automatically by date , is it possible to do by week?
December 1, 2021 at 10:27 PM #45890
BrendanKeymasterHi Prashant,
You can do that but you would need to write a Calculation field formula to extract out a week number from the current date, then group on the Calculation field. You can use the DATE() function to format a date into a week.
DATE([Date Field]; "w")
for week of year
DATE([Date Field]; "W")
for week of monthThe second parameter is the date pattern value you can use to tell Tap Forms what part of the date to return.
See this link for more information on what patterns you can use:
http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns
There’s also a link to it on the Calculations topic in the online user manual:
https://www.tapforms.com/help-mac/5.3/en/topic/calculation
Thanks!
Brendan
December 2, 2021 at 11:32 AM #45907
Prashant MParticipantHI Brendan,
Thanks for reply , this is my first calculation , I’ve tried typing formula , it’s showing me blank , please see two screenshotsAttachments:
You must be logged in to view attached files.December 2, 2021 at 3:16 PM #45914
Daniel LeuParticipantHave a look at the return type. It should be set to ‘text’.
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricksDecember 2, 2021 at 7:55 PM #45916
Prashant MParticipantHI Daniel,
Setting this to text to works ! Thank youDecember 2, 2021 at 8:48 PM #45922
Daniel LeuParticipantPerfect!
Cheers, Daniel
---
See https://lab.danielleu.com/tapformspro/ for scripts and tips&tricksDecember 3, 2021 at 3:16 AM #45925
BrendanKeymasterAlso, the
[ ]
is for fields on the iOS version only. The Mac version doesn’t need that as you’ve discovered because when you double-click on a field, it inserts a token into the formula.Glad you got this to work.
December 3, 2021 at 3:18 AM #45926
BrendanKeymasterAlso, if you look at the formula editor, you’ll see a list of functions that you can double-click on to insert into your formula. You’ll also notice at the bottom of the formula editor window when you have a function selected, Tap Forms tells you how to use it and also tells you what the Return type of the function is. Use that info to set the Result Type to the correct Number, Date, or Text option.
December 3, 2021 at 7:09 AM #45932
Prashant MParticipantHi Brendan,
Thanks for the reply . You are right ,it does say what it returns ! I didn’t pay attention. -
AuthorPosts
You must be logged in to reply to this topic.