How to get the Id of the selected item in an input autocomplete?

How to get the Id of the selected item in an input autocomplete?

  

Hi!

I am having a problem with the input autocomplete. I have followed the guide of OutSystems to make one but I do not understand how to get the Id of the selected item.

I have used the screen action:

Input_AutoComplete_GetIdentifier

But it is returning a text instead of an Id. As an example, let us assume I have an entity named "Cars" which have the attributes "Id" and "Model".

If I make the user search by "Model", Input_AutoComplete_GetIdentifier is returning the "Model". I want to get the Id of that "Model" in the "Cars" Entity. How is it done?

Thanks in advance!


Solution

Hi Michael,

Please see the attached oml , i have created a small example for you. Home page i have used Auto complete control and also there is a button ShowId when you click on it you will see the id of the selected item.


Regards

-PJ-


Solution

Hi PJ,

Thank you so much for this. I found out in your example what I was missing.

Thank you!

Good to hear it helps you ..you are always welcome for any question queries suggestions.


Regrads

-PJ-