Repair Number (Separate from Uniqueid)

I am building a Repair App. Each repair has its own unique Repair Number (Separate from Uniqueid), per store by;

MAX(

SELECT( Repair[RepairNumber],

[id_Store].[id] = [_ThisRow].[Store_id])

)+1

The problem I’m facing is I have this app filter out all the “complete” and “canceled” repairs. Which make my Repair Number start over. Is there a way to over come this issue?

Thank you!

Record the current max repair number in another utility table and reference that instead.

You mean, e.g. ;

  1. Create a column such as RepairNumber, in my Store table.

  2. Create an action so that the RepairNumber updates every time you save a form

Am I correct?

If I am, it doesn’t seem to do the trick because, people will also edit the forms at a later time, and I need to have 2 actions depending on which form you start on (Grandparent of Repair, or Parent of Repair) .

Try this: COUNT(SELECT (Repair[RepairNumber], [id_Store]=[_ThisRow].[Store_id]))+1

I might not understand properly your request, but are you using the “Initial Value” area to write your code ? I believe it wouldn’t change if so

Yes, that could be one way.

I don’t really understand what you’re describing there, or see why it would be an issue.

Thank you very much!

If you’re filtering records out (Security Filters, right?), then that formula will fail the same way that your first formula was failing. I don’t see how this could be the solution to your issue.

ON SECOND thought, that only solved half my problem…

When I enter two Repairs at the same time by the inline of the form, it gives the same RepairNumber.

Any ideas on how to go about this? :confused:

You’re absolutely right :disappointed_face:

I’m stuck…