Quirky Pre-Fill Puzzle

I feel like this should be easier than it is. We have an invoice submission system that requires users to identify a department when they submit their invoice.

We have a separate table for our chart of accounts, organized by department. Every invoice is assigned an expense category from the chart of accounts.

We’re using mini-extensions to manage approving and rejecting invoices.

When someone submits and invoice, they generally get the department correct. But we don’t expect them to know the exact category that the expense belongs in. The approver is adding that information.

When someone goes to approve an invoice, they have to select a category for the expense, from the list in the chart of accounts table. I can set the form up so that they first have to choose a department, and then can see only the expense categories for that department. But I cannot figure out how to prefill the form so that it is always starting with the department provided in the URL.

I feel like this should be easier than it is and I’m just being dense.

I know I can do what I want when a form is being filled out (see Variable form prefill - #11 by Abdul) but I need to do this when I’m editing the form.

Hey Amanda,

I will contact you directly to ask for some further clarification on this.

Best,
Hannes

With help from @Hannes I was able to figure this out:

In the invoice table, the field that has the Department is called “Pay from which dept”. In the table with the chart of accounts, it’s just “Department” so adding this to the URL worked:

'?prefill_Department=' & SUBSTITUTE({Pay from which dept}, ' ', '%20')

1 Like

I’m glad this worked for you! :slight_smile: Feel free to reach out to us again if you have any further questions! We’re always happy to help!