Power FX - Text Function Tutorial

Unlock the power of text manipulation in Power FX! In this engaging tutorial, explore essential functions like upper, lower, proper, and trim to enhance user-entered text in your Power Apps. Dive deep into combining these functions for dynamic transformations that boost functionality and presentation. Perfect for low code enthusiasts wanting to elevate their app's user experience! #powerfx #advanced #lowcode

  • 03:25
  • 210 views
00:00:09
see how they can transform and enhance user entered text.
00:00:13
Imagine you are creating a Power Apps application with
00:00:17
on one side,
00:00:18
a text input named user text where the user can freely enter text
00:00:22
and on the other side a label meant to display the result of our manipulations.
00:00:27
To start,
00:00:28
the upper function is a simple tool that converts all entered text to uppercase.
00:00:33
By using the formula upper,
00:00:34
each letter of the text will be transformed into uppercase.
00:00:38
This function is ideal for standardizing text display,
00:00:41
especially when the case does not matter.
00:00:44
Conversely,
00:00:45
if you want to convert everything to lowercase,
00:00:48
the lower function is your ally.
00:00:51
To give a professional touch to your text,
00:00:53
you might want to capitalize the first letter of each word.
00:00:56
The proper function is perfect for this.
00:00:59
By using this function,
00:01:01
the first letter of each word will be capitalized,
00:01:04
while the rest of the text remains in lower case.
00:01:07
This is ideal for formatting proper names,
00:01:09
titles,
00:01:10
or any other input that requires a neat presentation.
00:01:15
Extra spaces at the beginning or end of the text can sometimes cause issues.
00:01:19
The trim function helps eliminate them.
00:01:21
By using this function,
00:01:23
all spaces at the beginning and end of the text are removed.
00:01:27
For example,
00:01:27
if the user enters Hello world with spaces before and after,
00:01:31
the result will be returned without the extraneous spaces.
00:01:35
This ensures that the text is formatted
00:01:37
correctly without errors due to accidental spaces.
00:01:41
If you need to know the length of the entered text,
00:01:43
the len function is exactly what you need.
00:01:46
You will get the total number of characters in the text,
00:01:49
including spaces and punctuation.
00:01:51
This is useful for imposing length limits or analyzing user input.
00:01:58
Sometimes you need to replace certain words or phrases in your text.
00:02:01
The substitute function offers you this flexibility.
00:02:04
By applying the following function,
00:02:06
every occurrence of the word power will be replaced with Microsoft Power.
00:02:11
This is an effective way to dynamically correct or adapt user entered content.
00:02:16
But why stop there?
00:02:18
By combining several functions,
00:02:20
you can achieve even more powerful manipulations.
00:02:23
Let's take this complex formula.
00:02:25
What exactly does it do?
00:02:27
First,
00:02:28
substitute removes all spaces from the text by
00:02:31
replacing each space with an empty string.
00:02:34
Then upper
00:02:35
converts the obtained result to uppercase.
00:02:38
Next,
00:02:39
Len calculates the number of characters in the text without the spaces.
00:02:44
Finally,
00:02:45
by assembling everything with Ampersson,
00:02:47
we create a complete sentence that displays the
00:02:49
modified text and the number of characters.
00:02:52
For instance,
00:02:53
if the user inputs Hello world,
00:02:55
the resulting output will be as follows.
00:02:58
This combination displays the text without spaces,
00:03:01
all in uppercase,
00:03:03
and indicates the total number of characters,
00:03:05
thus providing an in-depth analysis in a single formula.
00:03:09
By mastering these functions,
00:03:11
you can transform and adapt user text in multiple ways,
00:03:14
thus enriching the experience within your Power App's application.
00:03:18
Feel free to experiment with new combinations to
00:03:20
uncover the full potential of Power FX.

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

 

00:00:05
Vamos mergulhar nas funções de texto do Power FX e
00:00:09
ver como podem transformar e melhorar o texto introduzido pelo utilizador.
00:00:13
Imagine que está a criar uma aplicação Power Apps com
00:00:17
de um lado,
00:00:18
uma entrada de texto denominada texto do utilizador onde o utilizador pode introduzir texto livremente
00:00:22
e do outro lado uma etiqueta destinada a mostrar o resultado das nossas manipulações.
00:00:27
Para começar,
00:00:28
a função superior é uma ferramenta simples que converte todo o texto introduzido em maiúsculas.
00:00:33
Ao utilizar a fórmula superior,
00:00:34
cada letra do texto será transformada em maiúsculas.
00:00:38
Esta função é ideal para padronizar a exibição de texto,
00:00:41
especialmente quando o caso não importa.
00:00:44
Inversamente,
00:00:45
se quiser converter tudo em minúsculas,
00:00:48
a função inferior é a tua aliada.
00:00:51
Para dar um toque profissional ao seu texto,
00:00:53
pode querer pôr em maiúscula a primeira letra de cada palavra.
00:00:56
A função adequada é perfeita para isso.
00:00:59
Ao utilizar esta função,
00:01:01
a primeira letra de cada palavra será maiúscula,
00:01:04
enquanto o resto do texto permanece em minúsculas.
00:01:07
Isto é ideal para formatar nomes próprios,
00:01:09
títulos,
00:01:10
ou qualquer outra entrada que exija uma apresentação simples.
00:01:15
Espaços extras no início ou no final do texto podem por vezes causar problemas.
00:01:19
A função de corte ajuda a eliminá-los.
00:01:21
Ao utilizar esta função,
00:01:23
todos os espaços no início e no final do texto são removidos.
00:01:27
Por exemplo,
00:01:27
se o utilizador entrar no Hello world com espaços antes e depois,
00:01:31
o resultado será devolvido sem os espaços estranhos.
00:01:35
Isso garante que o texto está formatado
00:01:37
correctamente sem erros devido a espaços acidentais.
00:01:41
Se necessitar de saber o comprimento do texto introduzido,
00:01:43
a função len é exatamente o que precisa.
00:01:46
Obterá o número total de caracteres no texto,
00:01:49
incluindo espaços e pontuação.
00:01:51
Isso é útil para impor limites de comprimento ou analisar a entrada do usuário.
00:01:58
Por vezes precisa de substituir certas palavras ou frases no seu texto.
00:02:01
A função de substituição oferece-lhe essa flexibilidade.
00:02:04
Aplicando a seguinte função,
00:02:06
todas as ocorrências da palavra poder serão substituídas pelo Microsoft Power.
00:02:11
Esta é uma forma eficaz de corrigir ou adaptar dinamicamente o conteúdo introduzido pelo utilizador.
00:02:16
Mas porquê parar por aí?
00:02:18
Combinando várias funções,
00:02:20
pode conseguir manipulações ainda mais poderosas.
00:02:23
Vejamos esta fórmula complexa.
00:02:25
O que é que faz exactamente?
00:02:27
Em primeiro lugar,
00:02:28
Substituir remove todos os espaços do texto por
00:02:31
substituindo cada espaço por uma string vazia.
00:02:34
Em seguida, superior
00:02:35
converte o resultado obtido em caixa alta.
00:02:38
Seguinte,
00:02:39
Len calcula o número de caracteres no texto sem os espaços.
00:02:44
Por último,
00:02:45
montando tudo com a Ampersson,
00:02:47
criamos uma frase completa que exibe o
00:02:49
texto modificado e número de caracteres.
00:02:52
Por exemplo,
00:02:53
se o utilizador digita Hello world,
00:02:55
a saída resultante será a seguinte.
00:02:58
Esta combinação apresenta o texto sem espaços,
00:03:01
tudo em caixa alta,
00:03:03
e indica o número total de caracteres,
00:03:05
proporcionando assim uma análise aprofundada numa única fórmula.
00:03:09
Ao dominar estas funções,
00:03:11
pode transformar e adaptar o texto do utilizador de várias formas,
00:03:14
enriquecendo assim a experiência dentro da sua aplicação Power App.
00:03:18
Sinta-se à vontade para experimentar novas combinações para
00:03:20
descubra todo o potencial do Power FX.

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