понедельник, 12 марта 2018 г.

Disable auto complete of form control


Hi!
Today I've faced with an issue which causes some discontent of my client. He wanted to scan barcode via barcode field but without autocomplete in this field. What I mean: when you input something into the field (the field type doesn't matter), the system "remembers" this value and if you try to enter it one more time when you started to enter, the system will complete it for you. For example:
"111". When you started entering 111 second time the system will finish it for you.
And I'd need to disable this feature as my client wants. But I didn't find any property which can help me with this.
After a while, my friend suggested I use the method delAutoCompleteString() on the control.

Finally, the code for disabling autocompletion for control would look like this:
public boolean modified()
{
boolean ret;
;
ret = super();
element.delAutoCompleteString(this);
return ret;
          } 

I hope, this information will be helpful for someone else :)

Happy DAX-ing!