cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jeziel_Victor
Helper II
Helper II

PATCH FORMULA

Hi, I would like to know what error this formula is:

 

Patch('Security ActionPlan1';Defaults('Security ActionPlan1';
{
Responsável:TextInput1.Text;
'Descrição do Problema':TextInput2.Text;
Ação:TextInput3.Text;
Prazo:DatePicker1.SelectedDate;
Status:Dropdown1.Selected.Value
}));;

2 ACCEPTED SOLUTIONS

Accepted Solutions
StalinPonnusamy
Super User
Super User

Hi @Jeziel_Victor

Still, your code is missing close parenthesis. Please see the below code. 

  • End of first-line make sure to add )
  • Defaults('Security ActionPlan1');
  • At the end remove one )
  • });;
Patch('Security ActionPlan1';Defaults('Security ActionPlan1');
{
Responsável:TextInput1.Text;
'Descrição do Problema':TextInput2.Text;
Ação:TextInput3.Text;
Prazo:DatePicker1.SelectedDate;
Status:Dropdown1.Selected
});;

 

View solution in original post

Hi, @StalinPonnusamy @v-albai-msft 

I made sure but it keeps getting an error saying the argument number is invalid 2 received 1 expected

continua co merro.JPG

View solution in original post

19 REPLIES 19
StalinPonnusamy
Super User
Super User

Hi @Jeziel_Victor 

For Dropdown.Selected

 

Patch('Security ActionPlan1';Defaults('Security ActionPlan1';
{
Responsável:TextInput1.Text;
'Descrição do Problema':TextInput2.Text;
Ação:TextInput3.Text;
Prazo:DatePicker1.SelectedDate;
Status:Dropdown1.Selected
}));;

 

v-albai-msft
Community Support
Community Support

Hi @Jeziel_Victor ,

Seem that your Status column is a Choice column, if yes, you should use code like this:

Status:{Value:"Your Value"}

So try this formula:

Patch('Security ActionPlan1';Defaults('Security ActionPlan1';
{
Responsável:TextInput1.Text;
'Descrição do Problema':TextInput2.Text;
Ação:TextInput3.Text;
Prazo:DatePicker1.SelectedDate;
Status:{Value:Dropdown1.Selected.Value}
}));;

Best regards,

Allen

It didn't work, more errors appeared,

I deleted your change and the error that appears is this

erroformula.JPGerroformula2.JPG

 

StalinPonnusamy
Super User
Super User

Hi @Jeziel_Victor 

 

As I Mentioned, For the choice Column Patch command

 

Status:Dropdown1.Selected

 

 

It didn't work either

erroformula3.JPG

StalinPonnusamy
Super User
Super User

Hi @Jeziel_Victor

 

Can you please share the error information?

erroformula.JPG

StalinPonnusamy
Super User
Super User

Hi @Jeziel_Victor 

 

Looks like one closing parenthesis is missing. Highlighted below

 

Patch('Security ActionPlan1';Defaults('Security ActionPlan1');

 

and remove one at the end

 

Refer below example

 

Patch('Security ActionPlan1';Defaults('Security ActionPlan1');
{
Responsável:TextInput1.Text;
'Descrição do Problema':TextInput2.Text;
Ação:TextInput3.Text;
Prazo:DatePicker1.SelectedDate;
Status:Dropdown1.Selected
});

 

 

 

But it is being shut down

 

Patch ('Security ActionPlan1'; Defaults ('Security ActionPlan1';
{
Responsável: TextInput1.Text;
'Descrição do Problema': TextInput2.Text;
Ação: TextInput3.Text;
Prazo: DatePicker1.SelectedDate;
Status:Dropdown1.Selected
}));;

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,501)