Power FX - Search Function Tutorial

Unlock the power of data manipulation with our tutorial on the 'search function'! Discover how to effectively use lookup, search, and filter functions in Power FX for your low-code applications. Learn through real examples that enhance user experience by efficiently extracting and managing information. Join us for insights that boost your skills in no time!

  • 03:42
  • 10 views
00:00:06
search,
00:00:06
and filter functions are essential tools and power effects
00:00:09
for manipulating and interacting with data in your applications.
00:00:13
They allow you to search,
00:00:15
filter,
00:00:16
and extract specific information from a table or collection.
00:00:20
In this tutorial,
00:00:21
we will explore these functions through simple examples
00:00:24
to help you understand and use them effectively.
00:00:28
The lookup function returns the first record in a
00:00:30
table or collection that matches a given condition.
00:00:33
It is ideal when you need to retrieve a specific value based on a criterion.
00:00:38
Let's imagine we have a list of products called products with the columns,
00:00:42
product name,
00:00:43
price,
00:00:44
and category.
00:00:45
We want to display the price of a product based on
00:00:48
the name entered by the user in a text box.
00:00:50
For this,
00:00:51
we use the following formula.
00:00:53
Products is the data source containing the products.
00:00:56
The product name must match the value entered by the user in the input field.
00:01:01
This is the condition to find the product
00:01:04
whose name matches the one entered by the user.
00:01:07
Price is the field we want to retrieve from the found record.
00:01:11
Thus,
00:01:11
the formula returns the price of the product
00:01:13
whose name was entered by the user.
00:01:16
Next,
00:01:17
the search function allows you to search for a string in
00:01:19
a table or collection by examining one or more columns.
00:01:23
It is particularly useful for implementing keyword search.
00:01:27
We have a list of contacts called contacts with the column's title,
00:01:31
last name,
00:01:32
and city.
00:01:34
We want to allow the user to search for contacts
00:01:36
based on a keyword entered in this input field.
00:01:39
The formula to use is as follows.
00:01:42
Contax is the data source containing the contacts.
00:01:46
This retrieves the keyword entered by the user.
00:01:49
Title.
00:01:50
Last name and city are the columns in which to perform the search.
00:01:54
Thus,
00:01:54
the formula returns a table of contacts whose name,
00:01:58
first name,
00:01:59
or city contains the entered keyword.
00:02:04
The filter function is used to filter a table or collection
00:02:07
based on one or more conditions.
00:02:10
It allows you to display only the data that meets certain criteria.
00:02:14
Suppose you have a collection of tasks called tasks
00:02:17
with the columns title,
00:02:19
status,
00:02:19
and priority.
00:02:21
We want to allow the user to search for tasks based on their status.
00:02:24
The formula to use is as follows.
00:02:28
Tasks is the data source containing the tasks.
00:02:31
This is the condition to filter the tasks.
00:02:34
Thus,
00:02:34
the formula returns a collection of tasks that
00:02:37
match the criteria entered by the user.
00:02:41
To further refine the results,
00:02:43
it is possible to combine these functions.
00:02:46
For example,
00:02:47
we want to display contacts who live in the city entered by the
00:02:50
user in an input field that we will call text input city,
00:02:54
whose name or first name matches the keyword entered
00:02:57
in another input field called Text input search.
00:03:00
The corresponding formula is as follows.
00:03:04
The search formula
00:03:06
searches for contacts whose name or first name
00:03:09
contains the enter keyword.
00:03:11
Filter
00:03:12
then refines the results to include only those
00:03:14
residing in the city specified by the user.
00:03:17
Thus,
00:03:18
the formula returns the contacts that match the keyword
00:03:21
and live in the specified city.
00:03:25
In conclusion,
00:03:26
understanding and using the lookup,
00:03:28
search,
00:03:28
and filter functions in Power FX
00:03:31
is essential for creating powerful and interactive applications.
00:03:35
These functions allow you to manipulate data efficiently,
00:03:38
thus providing an enriched user experience.

No elements match your search in this video....
Do another search or back to content !

 

Mandarine AI: CE QUI POURRAIT VOUS INTÉRESSER

Reminder

Show