Menu

Show related data before writing to database

0 votes

Is there any way to set up dbfront to show related data, before writing to the database?
For example: user enters an order number. I want the application to pull the customer name for that order from another table and display it before saving the record, so the user can verify that the correct order was entered.

in How To by (510 points)
Is there already a relationship to the order table?
As a view, yes. I can get the customer info to display in dbfront after the record is saved, but I would like to have it appear before that.

1 Answer

0 votes

Option 1. Add columns to the Select.

If the order table is directly related to the table via foreign key, then you could include some customer information along with the order number in the lookup field.

That would allow your users to search for orders by number, customer name or anything else you included.

Option 2. Two stage save.

As an alternative you could make the save a two stage process.

  • The first stage would save it to the table but with a status of
    "DRAFT".
  • To move forward the user would then need to change the
    status from "DRAFT" to something else. That could be done via an
    ActionButton or some other action.

Depending on your needs this might become a Wizard. See: Data Entry Wizard

by (44.5k points)
edited by
Thanks Anthony - I don't think option 1 will work for what I'm trying to do. I'm talking about when creating a new record, not when searching for an existing one. Option 2 may work, though it does introduce some extra steps as you say.
I updated the answer to reference the Data Entry Wizard in case you need it.
Thanks I'll give that a shot.
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...