Skip to Content
Author's profile photo Satyadeep Dey

How type ahead works

This blog is relevant for SAP Hybris Cloud for Customer .

As you can see in image below (Figure 1)  there is a field with a value help into which I’ve typed “13” and the system returns 3 records .

This is called type ahead and in this blog I’ll explain how this works including how the system determines which records should be  shown in the drop down .

Type ahead feature works for input fields and also fields in the advanced find form provided a value help is linked to it .

 

  Figure  1

 

If you click on the value help icon next to the field then a popup appears as can be seen in figure 2 below . The basic search has been highlighted by a red box .

When a user enters a value into this basic search then it searches across columns of the list below . Each OVS has a list of columns against which this search is done by the system  .

The important thing to note is that this search is not for a specific column .

The type ahead feature of the input field is bound to this basic search and behaves in exactly the same manner .

              Figure  2

 

To understand this let us look at the data set below in figure 3 .

  Figure 3 

Let us suppose these are the only 4 records in the value help for the Installation Point ID field and also let’s assume that the search is configured to work across all of these columns .

If a user types in “B1” in this field then all 4 records will appear in the type ahead drop-down since the ID of each record has “B1” in it .

If a user types in “sid_” then record 1 and record 2 will appear in the type ahead drop-down since the serial id of these 2 records contains “sid_”.

If a user types in “24” then record 1 and record 4 will appear in the type ahead drop-down since the location of these 2 records contains “24”.

If a user types in “B1001” then only 1 record will appear in the type ahead drop down because right now in this data set there is only 1 record which contains “B1001” .

However, if a fifth record is added to this data-set such that the serial ID or name or location has “B1001” in it then typing “B1001” will result in 2 records in type ahead drop down .

So , it’s important to understand that the type ahead is not designed to return a unique record but a list of records that matches what has been entered . If a single record is coming then it’s because of the data and as we all know data can and will change over time .

 

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Vignesh Dharmaraj
      Vignesh Dharmaraj

      Hi Satyadeep,

      as per figure 1, when we type 13  the list value with ID 471 appears in the list because of the address or other field in standard value help containing 13?

      this will be confusing to users as the 3rd row returned does not relate to 13, as per the column data seen in UI. can we override the standard value help behavior anyhow?

      Regards,

      Vignesh

      Author's profile photo Satyadeep Dey
      Satyadeep Dey
      Blog Post Author

       

      Hello Vignesh ,

      The drop down on the field only has a couple of columns and so we cannot show all the fields based on which the search result is determined .But once user opens the value help or the particular record the link is obvious . Type ahead is like google search and just gives a preliminary list as a hint to the user .

      It's not possible to override .

      Best regards,

      Satya