web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Erro em fórmulas Power FX
Power Apps
Unanswered

Erro em fórmulas Power FX

(1) ShareShare
ReportReport
Posted on by
Preciso de ajuda para resolver o erro em minha fórmula. É um botão que gera um texto pré-definido a partir do preenchimento de campos, que serão alterados apenas como variáveis. Este é o meu código:
 
Se (
    IsBlank ( Txt_Nome . Texto ) ||
    IsBlank ( Txt_Cargo . Texto ) ||
    IsBlank ( Txt_CEP . Texto ) ||
    IsBlank ( Txt_Telefone . Texto ) ||
    IsBlank ( Drp_Projeto . SelectedText . Value ) ||
    IsBlank ( Drp_Gestor . SelectedText . Valor ) ||
    IsBlank ( Drp_Departamento . SelectedText . Value ) ,
    Notify ( "Preencha todos os campos antes de gerar o texto." , NotificationType.Error ) , // Ação quando a condição é verdadeira
    Definir (
        Texto gerado,
        "Comando para criação de usuário no AD:" & Char ( 10 ) &
        "dsadd usuário \" CN = " & Txt_Nome.Text & " ,OU = " & Drp_Departamento.SelectedText.Value & " ,OU = PrimeiraDecisão,DC = primeiradecisão,DC = local\ " " &
        "-samid " & Inferior ( Txt_Nome.Text ) & " -display \"" & Txt_Nome.Text & " \ " " &
        "-fn \"" & Primeiro(Split(Txt_Nome.Text, " ")).Resultado & " \ " -ln \"" & Último(Split(Txt_Nome.Text, " ")).Resultado & " \ " " &
        "-pwd P@ssw0rd -email \"" & Lower(Txt_Nome.Text) & " @firstdecision.local\ " -pwdneverexpires no -mustchpwd no" & Char ( 10 ) &
        "get-aduser " & Inferior ( Txt_Nome.Text ) & " | set-aduser -replace @{proxyAddresses=\" SMTP: " & Inferior(Txt_Nome.Text) & " @firstdecision.local\ "};" &
        "Departamento=\"" & Drp_Departamento.SelectedText.Value & " \ ";Manager=\"" & Drp_Gestor.SelectedText.Value & " \ ";homePhone=\"" & Txt_Telefone.Text & " \ ";" & Char ( 10 ) &
        " = ...
        Txt_Nome.Texto & Char ( 10 ) &
        "Informações de acesso à rede firstdecision.local" & Char ( 10 ) &
        "Usuário: " & Lower ( Txt_Nome.Text ) & Char ( 10 ) &
        "Senha: P@ssw0rd" & Char ( 10 ) &
        "Domínio: firstdecision.local"
    )
)

E estes são os erros:


Caracteres inesperados. Caracteres são usados ​​em fórmula de forma inesperada.
Número inválido de argumentos: 1 recebido, 2 ou mais esperados.
Caracteres inesperados. A fórmula contém 'Error', em que se espera 'ParenClose'.

 
I have the same question (0)
  • Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    Looking at this, I see the following
     
    " = ...​​​​ Txt_Nome.Text & Char ( 10 ) &
     
    but there is no secondary "
     
    if I expand what you have, where is the second " for the ... you have in your pasted stuff above.
     
    " = ...​​​​ Txt_Nome.Text & Char ( 10 ) & "Firstdecision.local network access information" & Char (10) &
     
    Also you have things like
    "get-aduser" & Bottom (Txt_Nome.Text)
     
    What is Bottom?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 842

#2
Valantis Profile Picture

Valantis 563

#3
Haque Profile Picture

Haque 402

Last 30 days Overall leaderboard