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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Quando um formulário é...
Power Apps
Answered

Quando um formulário é enviado, cria o item na lista de base no sharepoint e atualiza um campo em uma segunda lista

(0) ShareShare
ReportReport
Posted on by 5

Olá, eu possuo duas listas diferentes no SharePoint e envia uma resposta de um único formulário para duas listas. Uma segunda lista (base do formulário no PowerApps) é criada depois da primeira e eu preciso capturar uma resposta da segunda lista e atualizar ou registrar ou registrar uma primeira lista. A descrição do código é assim:

Lista 1: Registro1

Lista 2: Registro2 (Base do formulário)

No botão no evento, selecione o formulário:

Patch ('Registro1'; (Primeiro (Filtro ('Registro1'; Processo = Valor (lblID.Text); 'Campo2' = cmbAprovaMA.Selected.Value))))

Uma função não retorna um erro, mas também não atualiza a Lista1 em nenhuma condição. 

Alguém consegue ajudar?

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @evaldobaladelli :

    Firstly, let me explain why the lista 1 has not been updated:

    The point is syntax.

    We can split this code into 2 parts:

    Part1:

     

    Patch ('Registro1';”Part 2”)

     

    Part2: 

     

    Primeiro (Filtro ('Registro1'; Processo = Valor (lblID.Text); 'Campo2' = cmbAprovaMA.Selected.Value))

     

    According to the formula, the result of Part2 will used to update 'Registro1'.

    However, the key is that the operation performed by part2 is to filter out specific records from "Registro1". From the results, the return value of part2 is still the original record in the table "'Registro1'", which is equivalent to using "'Registro1'" own records to update their own records, so in any case, "'Registro1' "Nothing will change.

    Secondly, I suggest you change your code to the following format.

    PatchDataSourceBaseRecordChangeRecord1)

    For example:

     

    Patch ('Registro1'; (Primeiro (Filtro ('Registro1'; Processo = Valor (lblID.Text); 'Campo2' = cmbAprovaMA.Selected.Value)));
    {Field1:value1; /*Filed1/2/3 is field names*/
    Field2:value2; /*value1/2/3 is the value you want to update*/
    Field3:value3}
    )

     

    I think this link will help you a lot:

    Patch function in Power Apps

    Best Regards,

    Bof

  • evaldobaladelli Profile Picture
    5 on at

    Ola v-bofeng

     

    obrigado pelo retorno mas pronto usando uma solução do Power Automat que funciona perfeitamente.

     

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard