To continue with this content, please log in with your Data Access ID or create a new account.
Cancel Data Access ID
You may not be authorized to see this content. Please contact Data Access Europe for more information.
Cancel Data Access Europe
You are not authorized to see this content.
Cancel Data Access Europe
Next lesson:
Building a Search Engine
Cancel

Build your own Search Engine

Adding a search field to a view

  1. Return to the DataFlex Studio, and make sure the TrackSelect.wo is open.
  2. Press F7 to open the preview window.
  3. Select the CLASS PALETTE icon from the top toolbar.
  4. From the Class Palette on the left locate the cWebForm, left click on it, hold, and drag and drop it onto the preview window.
  5. In the Properties tab on the right…
  6. Locate psLabel and change its value to ‘Search’
  7. Locate peLabelPosition and change its value to ‘IpTop’
  8. Locate pbPromptButton and change its value to ‘True’
  9. The preview now shows a search field that is titled “Search,” the label is above the bar, and an eyeglass prompt button has been added.
  10. Close the preview window
  11. To implement the procedure on prompt, so that the value the user enters is considered…
  12. Locate pbPromptButton to True, and add the following below it…

  13. In the data dictionary the ‘Procedure OnConstrain’ needs to be implemented, so that it constrains the rows to the search value. To do that locate Object ovwTrack_DD is a cvwTrackDataDictionary, and add the following below it…

  14. To test this, press the COMPILE icon on the top toolbar to see the live view in a browser page.
  15. To view the newly built view, select the HAMBURGER MENU >> VIEWS >> TRACK
  16. Enter a band’s name, such as QUEEN, and select the hourglass icon to see the results.