Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: 1 [2]
  Reply  |  Print  
Author Topic: Is there a way to enforce AFTER FIELD validation before executing ACTIONS block?  (Read 27485 times)
Reuben B.
Four Js
Posts: 1119


« Reply #15 on: June 27, 2019, 02:26:07 am »

...

For the completer discussions:
Sure it would be desirable to have a "translating" completer, meaning the 'C' code is in the INPUT and not the completed text (CAR).
But as far as I understand Huy's comments *both* the code and the completed text are wanted to be visible , so its not an INPUT from just 1 field (if both are wanted we would need to implement a way to express in which field the code has to be displayed)
In any case if you feel a build-in translating completer option (as Huy wrote: A "combobox-like" implementation of the autocompleter) could save you a lot of code, feel free to send in  a feature request via the support centers and illustrate some code samples how you think it should work.

Regards, Leo


Leo,

that has already occurred, FGL-4187 https://4js.com/support/issue/?id=FGL-4187 is the task that needs to be re-opened and have the additional requestors and information added.  The airport code example https://github.com/FourjsGenero/ex_autocomplete is perfect case, the 3-letter airport code is what is in the database but user should be able to type in city name and have the completer find the code.  To get both the code and completed text visible can be covered by including the code in the items description, just like a combobox that has ITEMS=("Y","Y-Yes"),("N","N-No")

Reuben

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Enrico S.
Posts: 40


« Reply #16 on: June 27, 2019, 10:31:49 pm »

Hi, Guys.
Just to further discuss this topic ...

In my implementation I fill the completer list with both Code and Description (as well as Customer Code and Customer Name) separated by a token (#), so the completer list appears of type "cust01 # John Smith", "cust34 # Mark Spitz" and so on.
Then when the user make his choice I use the tokenizer method to split the returned string getting only the code, and I jump to NEXT FIELD.
Behind the completer I compose the list setting the WHERE condition to match the typed value in both code and description columns of the table.
By this way I use just one input field to search both code and description (or name & surname and so on) like the input cell of a search engine, and I show to the user the "code" with as many info I want.
In my opinion, in some cases, this method could be better than having two items in the list as in a comboBox because there are no limits on showing info and getting contents from the choosen list element.

What I miss is only the possibility to choose whether to move the focus or stay on the current field after the user has made his choice.

Best regards.
Enrico


Leo S.
Four Js
Posts: 129


« Reply #17 on: June 27, 2019, 11:48:44 pm »

What I miss is only the possibility to choose whether to move the focus or stay on the current field after the user has made his choice.
Enrico, your wish is clear.
If you would get an additional ON CHANGE in the moment the end user did make the selection you would be able to place an appropriate NEXT FIELD NEXT in your code if the chosen value matches 1:1.
Alternatively clients could respect the AUTONEXT attribute of the .per
Regards, Leo
Enrico S.
Posts: 40


« Reply #18 on: July 01, 2019, 08:03:19 am »

Hi, Leo.
Yes, it could be a solution as long as it is possible to have appropriate comparison values (at the moment we do not have them).

Regards.
Enrico
Pages: 1 [2]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines