Limit number of entries in a table for each date - HELP

Hi Team,

I want to limit the number of entries in a table to ‘n’ number of entries FOR EACH DATE FROM CURRENT DATE TO DATES OF UPCOMING MONTHS. Kindly help me with the expression for the above .

Thanks
Javed

0 6 212
6 REPLIES 6

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Javed_Hussain

If these are children of another table, you may want to have a look there:

Or, if it’s from the main table:
please add a condition on show_if condition of your “add” action:

COUNT(
  FILTER("YourTable",
    [Date]=TODAY()
  )
)
<5

Those are good solutions by @Aurelien

Here is another one: you could change/replace your Add action for a Grouped one with:

  1. New action called something like “LinkToThisView” configured this way:
    • Activate “Needs Confirmation” message like “You can’t add more that X records today”
    • Create a condition under Behaviour so that this is only available when there are X records, if there are less than that, then the action gets ignored in the group.
    • Make sure it’s Appearance config → Prominence is as “Do not display”
  2. Change your Add action.
    • Create a condition under Behaviour so that this is only available when there are less than X records, if there are X records, then the action gets ignored in the group. (The oposite of the other one) [Basically the Show_If that Aurelien said]
    • Make sure it’s Appearance config → Prominence is as “Do not display”
  3. Create the group action called like “AddIf”
    • Add the First action
    • Add the second one
    • Change it’s appearance config to a fancy Display Name if you need
    • Change it’s appearance config to an “Add” icon
    • Change it’s appearance config to “Display overlay”

This way, you should have an Add button that changes it’s behaviour as needed and tells the user when/why they can’t add more records

Note that this solution won’t affect the Add button present on inline views.

Yep, Inline views are chained to the system Add button (Or maybe the first Add created by user).
The good thing is that using @Aurelien’s advice the Add button will disappear

Thanks Aurelien,SkrOYC and Steve …

I am using this expression in my parent table limiting to suppose 1 record :

IF(COUNT(SELECT(Parent[BookID],TRUE))<1,“ADDS_AND_UPDATES”,“UPDATES_ONLY”)

When I do selections and save it, … Only one (01) record saved in the parent Table and in the app it looks like this -


The record entry in parent table is limited to one record entry and its fine But
I want to make the limitation date wise, so here its not allowing me to select another date.

Please help me with the expression to limit the entry date wise .

Try my solution.
If you need help with the expressions, come back here after the actions are created

Top Labels in this Space