Jump to content
  • 0

if autofill data not present, trigger new form entry


Mike1633

Question

I have multiple tables, some with customer data, some with employee data, some with regional data. I have an input form for projects that asks for each of these items (customer name, employee name and regional data) Those fields have autofill assigned to the form while entering data so if that customer, etc, already exists from their respective tables, you can click the autofill. If they do not exist, after entering just that fields data (customer name) a new form will automatically open to complete the other customer info for the customer table, then jump back to the project form for completion. Is this possible to do or am I starting this with the wrong strategy.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi,

In this option that I will give you, I am assuming that you are using "AutoComplete" type of form element for your Customer Name Field.

What you can do here is create a submission form to add new customer information (Let's call it Add New Customer DataPage).

Then, in the Destination and Email - Destination after record submit, you can choose "Close Window" and then click the Source in the editor paste this code:

<script>
alert("New customer has been added!");
setTimeout(function () { win.close();}, 2000);
</script>

This code is to give you an alert message and close the form after 2 seconds.

In your original input form, if you have set the "Customer Name" field as AutoComplete, you should not be able to receive any suggested name if the name is not yet on the list, right?

If so, add an HTML Block  after the "Customer Name" field. Click the Source and then Paste this code:

<a href="DEPLOYMENT CODE OF ADD NEW CUSTOMER DATAPAGE" onclick="window.open(this.href, '', 'resizable=no,status=no,location=no,toolbar=no,menubar=no,fullscreen=no,scrollbars=no,dependent=no,width=200(DEPENDS ON YOU PREFERENCE),height=200')(DEPENDS ON YOU PREFERENCE); return false;">Add New Customer</a>

This link goes to the "Add New Customer" DataPage. 

After filling the "Add New Customer" with the new customer details, you should be able to see the new customer name when you type it in the "Customer Name" field.

This should address the function that you want.

image.png.fc142f351958dacd9ed11c098f0b929a.png

**I do have some suggestion for you though.

**Customer name is not really a good field to use in identifying customers/records because this not a unique record. What I would suggest is to use email address, ID or other information unique to your customer/data.

**You can also make your fields Cascading Element (https://howto.caspio.com/datapages/datapage-components/cascading-elements/) so that when you enter say an email address, your customer name or any other field associated to the email address can become autocomplete. This add mores integrity and control in your data input and records.

Hope this helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...