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 217
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