Jump to content
  • 0

Autocomplete Problem



Hello All,

I have set up a datapage that previously was configured with a Dropdown form element. I have attempted to change it to an AutoComplete form element. When I do the change, the options limit my "Filter by:" choices to only the fields in my Lookup Table that are number fields. I need it to be able to filter by Text fields.

Any ideas of what the issue is? Are the AutoComplete fields limited to Number fields only?????



Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

The answer to this question doesn't really say enough to be helpful.


The problem the original person is having is that same issue that I have.


I have a table that stores several lookup key fields as IDs from other tables. I can set those fields to be editable dropdowns in the submission datapage form that will list a text field in the dropdown, but store the ID number in the key field on my record.


But if I try to change the field on the form to an AutoComplete field, the only choices the wizard gives me for searching values on that form are other integer fields in the lookup table.


If I go back to my original lookup table and change the key field from integer to text, then I can create a submission form that includes an autocomplete form that will search on a text field in a lookup table - however once I have made an autocomplete selection, the TEXT of my selection is stored in the key field, NOT the ID.


I want to be able to have an autcomplete field that uses a text field in the lookup table but stored the ID number in the record updated by the form. Is this not possible?

Link to comment
Share on other sites

  • 0

Hello jgorny,


Welcome to Caspio forum!


If I understand correctly, it is possible, but it requires several steps:

  1. Add a Virtual field, select Autocomplete form element, select your table and the Text field.
  2. Select your field, select any cascading form element, for example Cascading Text Field.
    • Select the Virtual field in the Parent field;
    • Select the same Lookup table;
    • Select the Text field in Filter cascade by;
    • Select the ID field in the Field for value.
  3. Hide the field with a Rule.


Does it work for you?


Also you can use a Dropdown Form element instead of AutoComplete.

Link to comment
Share on other sites

  • 0



I think I understand you correctly.


I have a field with a lastnamefirst_usr and a user_id field.


I'd like to use autocomplete based on the name, but have the user_id field entered in the form.


So I start with a virtual autocomplete field that selects from lastnamefirst_usr.


Then I add a cascading field that uses the autocomplete as a parent field, and selects the user_id field from the table.


And I know ways to hide that second field. Is that correct?


I originally had code that populated a dropdown and changed the value of the dropdown based on an autocomplete field, but that dropdown gets mighty big and I think doing the cascade select might fix that problem.


I will give it a try.


EDIT: This worked perfectly, and provided many more flexible sorting and presentation options. Thanks!

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.

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.

  • Create New...