Submit point - Autocomplete a metadata field?

Post Reply
User avatar
magnussandstrom
Advanced member
Posts: 365
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Submit point - Autocomplete a metadata field?

Post by magnussandstrom »

Hi, is it possible to to implement autocomplete in a metadata field in a submit point some how?

In this case I would like to show suggestions of previous used email-addresses when you start typing, like this:

autocomplete.png
autocomplete.png (52.13 KiB) Viewed 11086 times
JBoyd1976
Newbie
Posts: 3
Joined: Thu Jan 11, 2018 11:27 am

Re: Submit point - Autocomplete a metadata field?

Post by JBoyd1976 »

When you use Dropdown List for your data field and you list all the emails available, the user will see the full list when they click the dropdown field but if they start typing the list will shrink and only display the values that contain the letters you are typing.

So you could have a list that contains 50 emails, but only 2 emails contain the name john. When you click the field and type john, you will only see those 2 emails. This is part of the functionality of switch
User avatar
magnussandstrom
Advanced member
Posts: 365
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: Submit point - Autocomplete a metadata field?

Post by magnussandstrom »

JBoyd1976 wrote: Thu Jun 15, 2023 11:15 am When you use Dropdown List for your data field and you list all the emails available, the user will see the full list when they click the dropdown field but if they start typing the list will shrink and only display the values that contain the letters you are typing.

So you could have a list that contains 50 emails, but only 2 emails contain the name john. When you click the field and type john, you will only see those 2 emails. This is part of the functionality of switch
Yes, but if the email address/addresses is not already in the list that approach doesn't work. In my case the user should be able to type any email address. And I would like the autocomplete list to grow when new addresses are added.
tdeschampsBluewest
Member
Posts: 37
Joined: Tue Jun 01, 2021 11:57 am

Re: Submit point - Autocomplete a metadata field?

Post by tdeschampsBluewest »

Hi Magnus,
It depend if it's on a checkpoint or a submit point (this one is trickier

In any case, after the addition of the new value, you should find a way to store it in an array (adding at the end of an XML, in a CSV file, a database, a global data...)
Before passing trough the checkpoint, you need to pick this array ), and set it in the dropdown value.

In the case of a submit point, since the job does not come with any information at this point, the only way is to use a database request, or a scripting expression to access a global data.

Keep in mind that you need to manipulate the values of the dropdown to have them with a ";" separator.
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: Submit point - Autocomplete a metadata field?

Post by freddyp »

A dropdown list can be populated by an ODBC query or by a script expression.

I picture the following set-up. There is a script expression that reads the contents of a text file as an array. There is a text file per user. There is a script in the flow just after the submit point that updates the contents of the text file with new mail addresses.

Similarly, there is an ODBC query to a database to get the list of mail addresses for a certain user and in the flow just after the submit point there is a "Database connect" that updates the database with new mail addresses.
User avatar
magnussandstrom
Advanced member
Posts: 365
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: Submit point - Autocomplete a metadata field?

Post by magnussandstrom »

freddyp wrote: Fri Jun 16, 2023 9:29 am A dropdown list can be populated by an ODBC query or by a script expression.

I picture the following set-up. There is a script expression that reads the contents of a text file as an array. There is a text file per user. There is a script in the flow just after the submit point that updates the contents of the text file with new mail addresses.

Similarly, there is an ODBC query to a database to get the list of mail addresses for a certain user and in the flow just after the submit point there is a "Database connect" that updates the database with new mail addresses.
Thanks Freddy, but how would that work for 'new' addresses? Could one submit a value that doesn't exist in the database yet in a dropdown list?
freddyp
Advanced member
Posts: 1023
Joined: Thu Feb 09, 2012 3:53 pm

Re: Submit point - Autocomplete a metadata field?

Post by freddyp »

In the submit point metadata you can type a value that is not in the dropdown and submit, so I thought it would work, but unfortunately the value does not make it into the metadata.

As a workaround you could have an additional field "New mail address" that the user uses when the mail address is not in the dropdown. Not perfect, but better than nothing perhaps?
User avatar
magnussandstrom
Advanced member
Posts: 365
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: Submit point - Autocomplete a metadata field?

Post by magnussandstrom »

freddyp wrote: Fri Jun 16, 2023 11:24 am In the submit point metadata you can type a value that is not in the dropdown and submit, so I thought it would work, but unfortunately the value does not make it into the metadata.

As a workaround you could have an additional field "New mail address" that the user uses when the mail address is not in the dropdown. Not perfect, but better than nothing perhaps?
Ok, to add another field kinds of ruins the whole idea of a user friendly UI, then you first need to try the drop down field and if nothing comes up you need to fill out another field..

The experience we want to simulate is the one when you are writing a new mail in Outlook and start typing a name in the TO field.
Post Reply