Custom form workflow, and action trigger for selected items in the checklist component

Hi all, I need your thoughts.

I have tables for Customers, Orders, Items, and Shipping Batches, along with corresponding tabs for internal support staff use. Staff can add a new customer, create an order for an existing customer, or add items to new/existing orders, and create a new shipping batch.

The workflow should allow users to:

  • Add a new customer and then an order with multiple items.
  • Create an order from an existing customer’s details screen.
  • Add items to the current shipping batch from from details screen.
  • Add new items to an order from its details screen.

Each detail screen shows its related elements (e.g., customer detail shows order history, Order show Ordered Items, and Shipping Batch shows Linked Items). I have two challenge at this stage:

The first is managing transitions between custom forms to create a workflow, such as adding a new customer, then creating an order for the customer, and finally adding items, all in one session.

The other roadblock I’m facing is adding existing items to a Shipping Batch from the shipping batch detail screen. There’s “add” button that writes the Shipping Batch ID to the user profile and opens a checklist of items with unassigned Shipping Batch IDs. I want to update the Shipping Batch ID for checked items from the user profile when a user clicks “Done” button. I can achieve this through If-Then-Else on Shipping Batch ID column in Items table, but that would become computed field for all rows that auto update itself every time Shipping Batch ID in the User Profile changes i.e., user navigates to different shipping batch detail screen.

How would you solve this? Thanks!!

commenting to get engagement

Please don’t do this, we’ll try to help you when the time allows.

For your question, I have some questions back for you:

1/How are you structuring your Shipping Batches table? A Shipping Batch would contain multiple order IDs?

2/For your problem here.

Is there a reason you have to do it in one session? I would think creating a customer would be done inside a native form, then you finish adding a customer, and going to the details screen of that customer to add a new order.

That new order would be a custom form so it allows you to add items inside it. Write a random ID to the user profiles table, and use that to link the order and the items (since the order’s native rowID doesn’t exist at that point).

1 Like

I actually thought my post has been ranked low lol, but thanks; I now realize it is being dishonest in community forums unlike social media.

No, an Item would have a Shipping Batch ID in the Items table

Not really, the idea is to save the user from having to first create the customer, then manually navigate to the order section, and search for the newly created customer to add the order, or avoid similar cases. But I can always do this after MVP.

For this, I am currently sticking to list items as clicking on each item can fire action, but I liked the idea of select-able checklist

I have a similar need and I would like to know if the experts have figured out a Glide solution to this common pattern. Here is another simple example of the same pattern: we have 3 entities, a customer, a job card and a vehicle. We need to create a job card to book in the vehicle for a service.
Ideally, you would start by creating a job card and then select a customer from a list. If the customer has not been created yet, have an easy way to add a new customer (perhaps in a slide-in form). After selecting the customer, their details are populated on the form. From here, we can select their vehicle and add service items to the job card from a lookup. Can something like this be done without having to resort to going to a ‘ad customer’ form, then a ‘add vehicle’ form and finally, navigating to another form to add a job card? Or am I expecting too much from Glide?

In my case, I have a working solution, and you could see if it works for you. Here’s an overview of my approach:

I have Customers table and Orders table.

I created another table called Custom Workflow, which includes:

  • Columns mirroring those in the main Customers and Orders table.
  • A relation to Customers table on the phone number field.
  • Lookup columns to retrieve customer data via the relation.
  • A boolean column, “Customer Already Exists,” that returns True if any lookup fields are filled, and False if they are empty.

With this setup, entering an existing customer’s phone number in the Custom Workflow table triggers the lookup columns to populate customer information, and the “Customer Already Exists” column will return True.

I also have a “current step” column in the user profile, defaulting to 1.

When initiating the “create order” action, I display a new screen with data from Custom Workflow. It has several containers with visibility linked to the current step and other conditions:

  1. The first container contains entry field prompts for a phone number. It is visible when the current step equals 1.
  2. The second container shows customer information and a button to move forward with creating an order, visible if “Customer Already Exists” is True. Clicking the button sets the current step in the user table to 4 (refers to container #4).
  3. The third container appears when the phone number is not empty and “Customer Already Exists” is False, prompting for new customer information.
  4. The fourth container displays order entry fields when the current step is 4.

When a user wants to create a new order, the first container prompts for a phone number. After entering phone number (text field set to minimum of 10 characters), one of two scenarios occurs:

  • If the phone number exists, the second container shows customer details and the button to move forward with creating a new order.
  • If the phone number doesn’t exist, the third container prompts for new customer information.

All entries are recorded in the Custom Workflow table as the user types. Only on the final confirmation page (another container on the same screen with confirm button), actions steps are executed to add new rows to the relevant tables. Also clear value from Custom Workflow table, reset current step to 1.

The main thing here is managing step transitions, containers visibility, and action conditions. I hope this helps.

I think you could create a separate thread for your question.

So you expect that users would always only need to add one order? What if they want to add another order after the first is done, or they accidentally click out of the form to add the orde?

I, in fact, expect them to add multiple orders in one session, but for different customers. For now, I’m always taking them back to the previous screen they started the action from after the completing adding order. I’m using overlay screen for custom forms, but I can see how accidentally exiting the form might happen on non mobile views. Wouldn’t re-entering the form take them back to where they left, which is good? The form table has all columns set to “column is specific to individual”, so each user can add orders independent of each other.

It depends on how you configure the action to open that screen, if it keeps where you are, then that’s good to go.