Group Records by Week

Viewing 8 reply threads
  • Author
    Posts
  • November 30, 2021 at 9:05 PM #45877

    Prashant M
    Participant

    Currently 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

    Brendan
    Keymaster

    Hi 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 month

    The 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 M
    Participant

    HI Brendan,
    Thanks for reply , this is my first calculation , I’ve tried typing formula , it’s showing me blank , please see two screenshots

    Attachments:
    You must be logged in to view attached files.
    December 2, 2021 at 3:16 PM #45914

    Daniel Leu
    Participant

    Have a look at the return type. It should be set to ‘text’.

    December 2, 2021 at 7:55 PM #45916

    Prashant M
    Participant

    HI Daniel,
    Setting this to text to works ! Thank you

    December 2, 2021 at 8:48 PM #45922

    Daniel Leu
    Participant

    Perfect!

    December 3, 2021 at 3:16 AM #45925

    Brendan
    Keymaster

    Also, 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

    Brendan
    Keymaster

    Also, 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 M
    Participant

    Hi Brendan,
    Thanks for the reply . You are right ,it does say what it returns ! I didn’t pay attention.

Viewing 8 reply threads

You must be logged in to reply to this topic.