JasonBowen
6 years agoQrew Trainee
Trouble using QuickBase Automation to update a record
Hello,
I am having trouble with a Procurement Request (PR) management application generating its own PR numbers, which must be unique, and in a sequential order.
I am working on a Procurement Request (PRs) management application.
The application has users assigned as Authorized Procurement Representatives (APRs), Department Heads (DHs), and Procurement Managers. APRs and DHs have restrictions on which department(s) they may create and/or approve procurements for, based on relationships between Departments and APRs or DHs.
When a PR is initially created, it is not yet assigned a PR number. When the PR is created, it receives a [Status] of "Pending Submission". This is the equivalent of a draft. Only the user that created the PR can see it at this point. When the user is ready to actually submit the PR through the procurement process for the first time, they will click a button [formula URL] that:
The problem is that I'm getting duplicate PR numbers when multiple APR users (which have different restrictions on which departments they have visibility on) are creating and submitting purchase requests at different times.
What I need to happen is:
WHEN a PR is being submitted for the first time, it is assigned the next sequential number for PRs for the year (fiscal year). Only PRs that have been submitted apply toward this count ("Pending Submission" PRs do not count). Because "Pending Submission" PRs don't count, the PR # can't be applied at the time the record is initially created.
PR numbers would be "yyyy - ####". Once October 1st comes around, PRs will be numbered "2020 - 0001", etc.
Suggestions?
Thanks,
Jason
------------------------------
Jason Bowen
------------------------------
I am having trouble with a Procurement Request (PR) management application generating its own PR numbers, which must be unique, and in a sequential order.
I am working on a Procurement Request (PRs) management application.
The application has users assigned as Authorized Procurement Representatives (APRs), Department Heads (DHs), and Procurement Managers. APRs and DHs have restrictions on which department(s) they may create and/or approve procurements for, based on relationships between Departments and APRs or DHs.
When a PR is initially created, it is not yet assigned a PR number. When the PR is created, it receives a [Status] of "Pending Submission". This is the equivalent of a draft. Only the user that created the PR can see it at this point. When the user is ready to actually submit the PR through the procurement process for the first time, they will click a button [formula URL] that:
- Enters the date of today() into a field [Initial Submission Date]
- Changes the value of [Status] to "Submitted to Department Head"
- Assigns the next sequential PR number (i.e. 2019-0001, 2019-0002) to a text field [PR Number]
The problem is that I'm getting duplicate PR numbers when multiple APR users (which have different restrictions on which departments they have visibility on) are creating and submitting purchase requests at different times.
What I need to happen is:
WHEN a PR is being submitted for the first time, it is assigned the next sequential number for PRs for the year (fiscal year). Only PRs that have been submitted apply toward this count ("Pending Submission" PRs do not count). Because "Pending Submission" PRs don't count, the PR # can't be applied at the time the record is initially created.
PR numbers would be "yyyy - ####". Once October 1st comes around, PRs will be numbered "2020 - 0001", etc.
Suggestions?
Thanks,
Jason
------------------------------
Jason Bowen
------------------------------