cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
FabioBarbosa
Level: Powered On

Envio de dois formulário

Boa tarde,

 

Estou criando um aplicativo no powerapps com a base de dados no sharepoint em uma unica lista.

 

No Aplicativo, tenho dois formulários que pertencem a telas diferentes. Inicalmente começo na primeira tela, preencho o formulario, clico em próximo que me leva para essa segunda tela, onde preencho este segundo formulário e clico em salvar. Na base de dados do sharepoint esta criando dois registros. Gostaria que ficassem como apenas um registro.

 

Meu submit: SubmitForm(DadosFuncionario);;SubmitForm(Anexos);;Navigate(TelaInicial;ScreenTransition.Cover)

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Envio de dois formulário

Hi @FabioBarbosa ,

Could you please share a bit more about your scenario?

Do you want to submit your two forms data into a single one record in your SP List rather than separated rows?

 

Based on the needs that you mentioned, I think there is something wrong with your formula. The SubmitForm() function is used to create a new record into your data source.

 

As an fixed solution, I think the Patch function could achieve your needs. I have made a test on my side, please consider modify your formula as below (set the OnSelect property of the "Submit" button to following) :

Patch(
       'YourSPList';
        Defaults('YourSPList');
        EmployeeData.Updates;
        Attachments.Updates
);;
ResetForm(EmployeeData);;ResetForm(Attachments);;
Navigate(HomeScreen; ScreenTransition.Cover)

Please consider take a try with above solution, check if the issue is solved.

 

Please check and see if the following threads would help in your scenario:

https://powerusers.microsoft.com/t5/Expressions-and-Formulas/How-to-Submit-multiple-times-into-1-rec...

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Saving-data-from-multi-screen-power...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
chrisog
Level 8

Re: Envio de dois formulário

Oi @FabioBarbosa,

 

Tudo isso é feito através do Google Tradutor, portanto, tenha paciência comigo.

 

O que eu faria na sua situação é criar uma coleção intermediária para armazenar os dados da página 1, em seguida, corrigir os dados da página 2 na mesma coleção e usar a função Coletar para criar um novo registro na sua fonte de dados. É um pouco mais complicado, mas eu prefiro fazê-lo.

 

Você pode fazer isso fazendo com que o botão 'Avançar' na página 1 colete em uma coleção local, algo como: Coletar (myNewCollection, {campo1: TextInput1.Text, campo 2: Dropdown1.Selected.Value}) etc.

 

Então, quando você concluir a página 2, o mesmo princípio se aplica, exceto o Patch (myNewCollection, ThisItem, {campo3: TextInput2.Text, campo4: TextInput4.Text}) etc.

 

Em seguida, imediatamente após esse patch, colete na sua fonte de dados com: Coletar (myActualDataSource, myNewCollection)

 

 

Community Support Team
Community Support Team

Re: Envio de dois formulário

Hi @FabioBarbosa ,

Could you please share a bit more about your scenario?

Do you want to submit your two forms data into a single one record in your SP List rather than separated rows?

 

Based on the needs that you mentioned, I think there is something wrong with your formula. The SubmitForm() function is used to create a new record into your data source.

 

As an fixed solution, I think the Patch function could achieve your needs. I have made a test on my side, please consider modify your formula as below (set the OnSelect property of the "Submit" button to following) :

Patch(
       'YourSPList';
        Defaults('YourSPList');
        EmployeeData.Updates;
        Attachments.Updates
);;
ResetForm(EmployeeData);;ResetForm(Attachments);;
Navigate(HomeScreen; ScreenTransition.Cover)

Please consider take a try with above solution, check if the issue is solved.

 

Please check and see if the following threads would help in your scenario:

https://powerusers.microsoft.com/t5/Expressions-and-Formulas/How-to-Submit-multiple-times-into-1-rec...

https://powerusers.microsoft.com/t5/Building-Power-Apps-Formerly/Saving-data-from-multi-screen-power...

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

FabioBarbosa1
Level: Power Up

Re: Envio de dois formulário

Olá,

 

 

 

 

 

 

FabioBarbosa1
Level: Power Up

Re: Envio de dois formulário

Obrigado pela ajuda @chrisog .

 

Vou fazer os testes e vou posicionando aqui no fórum.

 

 

FabioBarbosa
Level: Powered On

Re: Envio de dois formulário

Olá,

 

Deu certo. Obrigado a todos.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,188)