Repair Number (Separate from Uniqueid)

NCD
Silver 2
Silver 2

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!

0 9 237
9 REPLIES 9

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

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.

You're absolutely right ๐Ÿ˜ž

I'm stuck...

image.png

 

 

 

 

ใ‚นใ‚ฏใƒชใƒผใƒณใ‚ทใƒงใƒƒใƒˆ 2022-11-04 13.29.19.png

 

 

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.

ใ‚นใ‚ฏใƒชใƒผใƒณใ‚ทใƒงใƒƒใƒˆ 2022-11-04 11.55.45.png

 

Any ideas on how to go about this? ๐Ÿ˜•

Yes, that could be one way.


@NCD wrote:

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) .


 

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

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

Top Labels in this Space