cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Update record

Hi,

 

I have to update multiple records and therefore cannot come with a single form.

 

My idea would be an update ()

Update (answers; First (filter (answers; ID = Value (LabelAWbarbeiten_1_ID.Text)));
{Answer: TextInput_Anonse1_1.Text; Question_ID: Value ('TextInput_letzeFrageID + 1'.Text);
correct: Toggle_Anonse1.Value}) ;;

then he tells me with a error;  "ID is a mandatory field"

 

ok, so i added ID, but now the error "ID is generated automatically by the server" - is that a bad joke?

 

There is a Share Point online list in the background.

 

I've been google for hours ...

 

Do you have an idea ?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Apps
Power Apps

Re: Update record

You probably need to use the Patch function in this scenario:

Patch(
  answers;
  LookUp(answers; ID = Value (LabelAWbarbeiten_1_ID.Text));
  {
    Answer: TextInput_Anonse1_1.Text;
    Question_ID: Value ('TextInput_letzeFrageID + 1'.Text);
    correct: Toggle_Anonse1.Value
  })

The Update function is used to replace an entire record in the data source, but what you want is to change a few fields of the record, so Patch is more appropriate here.

Hope this helps!

View solution in original post

2 REPLIES 2
Highlighted
Power Apps
Power Apps

Re: Update record

You probably need to use the Patch function in this scenario:

Patch(
  answers;
  LookUp(answers; ID = Value (LabelAWbarbeiten_1_ID.Text));
  {
    Answer: TextInput_Anonse1_1.Text;
    Question_ID: Value ('TextInput_letzeFrageID + 1'.Text);
    correct: Toggle_Anonse1.Value
  })

The Update function is used to replace an entire record in the data source, but what you want is to change a few fields of the record, so Patch is more appropriate here.

Hope this helps!

View solution in original post

Highlighted
Helper III
Helper III

Re: Update record

thanks!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,701)