How to prevent records being created if a condition fails?

I have been tasked with creating a job request app, and I keep hitting obstacles - spreadsheets are not my thing so I am out of my depth. I have a working prototype that does the job, but the client wants records to be created only if their sales reps are found in the database.

So I have tried to use the "Only if this condition is true" in the Add action for the relevant table - problem is, the app creates records every time. It does not appear to validate the condition. What am I missing?

The app has three views - an Intro/Onboarding view, a New Install view, and the Job Completed view.

In the New Install, we want a rep to enter their code, which fetches data from the Retailers database. They then fill out the form and submit the job - we want the job created, only if their details were found (valid retailer code). If the retailer code returns no data (invalid retailer code) how do I stop the job from being created?

Here is the conditional expression I am using for the Add action of the Clients table (the table with the job request details):

ISNOTBLANK(
  FILTER(
   "Find Retailer",
    IN([_THISROW].[Find Retailer Code], LIST([Found Retailer Name]))
    )
  - LIST([_THISROW])
)

Link to the app prototype here:
https://www.appsheet.com/start/f3f5571c-2e29-4b9f-a88a-1e5eb3ee2151

Some valid retailer codes: david, bob123, koalahvac 

Nice to have: Ideally, we would like to present a screen asking for the retailer code before the New Install view, and if the code doesn't exist, prevent the user from getting to the New Install form (show a No Access view), and if the code does exist, then take the rep to the New Install view with their data pre-filled.

At the very least: Prevent a job request being created if the retailer code doesn't exist in the Retailers table.


0 9 260
9 REPLIES 9
Top Labels in this Space