Auto-complete not functioning correctly

Use this board to ask questions or have discussions with other Rich Displays users.
MLC601
Profound User
Posts: 32
Joined: Mon Oct 10, 2011 9:30 am
First Name: Mark
Last Name: Chastant
Company Name: Jano Justice Systems, INC
Phone: 601-927-4428
Contact:

Auto-complete not functioning correctly

Post by MLC601 »

I've got an issue with a textbox with auto complete not working. I'm building choices and choice values lists in the RPG program. These are bound to the Choices and Choice Values properties respectively (comma separated). Here's the issue...if I make the field a textbox with auto-complete, no list appears, however, If I change the field to a dropdown, all of my choices appear...everything works as it should.

Any suggestions?

Thanks,

Mark
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: Auto-complete not functioning correctly

Post by Brian »

Can you give me an example of your comma separated lists that aren't working? That would help debug the problem. Also, make sure you are not putting the list elements in quotes as that won't work.
MLC601
Profound User
Posts: 32
Joined: Mon Oct 10, 2011 9:30 am
First Name: Mark
Last Name: Chastant
Company Name: Jano Justice Systems, INC
Phone: 601-927-4428
Contact:

Re: Auto-complete not functioning correctly

Post by MLC601 »

I'm loading the choices based on the records I've put in a subfile. For each record written to the subfile, I place the name in an array (n_choice).

Variable NameChoice is defined as a 15500A field, bound to the Choices property. I'm building NameChoice with the following code:
z = 1;
Dow z <= Choice;
NameChoice = %trim(NameChoice) + ',' + n_choice(z);
Z=Z+1;
Enddo;

Where Choice is the number of entries. No quotes around the choices.

All of this works fine if I make the field a dropdown.

Thanks,

Mark
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: Auto-complete not functioning correctly

Post by Brian »

Ok, I'm just not able to recreate the problem. So, what version of PUI are you running?

Can you set your screen as a text box with the autocomplete not functioning and send me the JSON for the screen? You would do this by running your program and then on the screen in question, entering "javascript:pui.downloadJSON()" in the address bar.
MLC601
Profound User
Posts: 32
Joined: Mon Oct 10, 2011 9:30 am
First Name: Mark
Last Name: Chastant
Company Name: Jano Justice Systems, INC
Phone: 601-927-4428
Contact:

Re: Auto-complete not functioning correctly

Post by MLC601 »

I sent the JSON via PM.

Thanks,

Mark
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: Auto-complete not functioning correctly

Post by Brian »

Ok, which field am I looking for?
MLC601
Profound User
Posts: 32
Joined: Mon Oct 10, 2011 9:30 am
First Name: Mark
Last Name: Chastant
Company Name: Jano Justice Systems, INC
Phone: 601-927-4428
Contact:

Re: Auto-complete not functioning correctly

Post by MLC601 »

would be NameChoice.

Mark
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: Auto-complete not functioning correctly

Post by Brian »

OK, I found your problem. Luckily it is something simple. When your program is outputting the comma separated list of names, it is putting a comma before the first entry. Removing this extra comma made the auto complete function work properly.

Let me know if you need any additional help.
MLC601
Profound User
Posts: 32
Joined: Mon Oct 10, 2011 9:30 am
First Name: Mark
Last Name: Chastant
Company Name: Jano Justice Systems, INC
Phone: 601-927-4428
Contact:

Re: Auto-complete not functioning correctly

Post by MLC601 »

Great! I appreciate the quick response!

So I assume to allow a blank entry, I'd need to put blank(s) before the first comma?

Mark
User avatar
Brian
Profound Logic Staff Member
Posts: 286
Joined: Thu Apr 14, 2011 10:23 am
First Name: Brian
Last Name: May
Company Name: Profound Logic Software
Contact:

Re: Auto-complete not functioning correctly

Post by Brian »

No need for a blank entry at all. The list for autocomplete is not a validation list. The text box will still accept any entry. so just remove the leading comma and you are set.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 8 guests