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 Apps
Unanswered

Id Field Required

(0) ShareShare
ReportReport
Posted on by 2

Hi All,

I'm new to power apps and I'm trying to build an audit app following the youtube tutorial video by Danel Chistian but now I'm stuck at this point (I'm using Sharepoint list as database): 

 

This is my table in which I have the questions for the audit (DomandeAM)

 

DomandeAM.png

 

 

 

 

 

In the homescreen, OnVisible, I create a collection based on the table above (ClearCollect(AM_Collection;DomandeAM)

 

AM_Collection.png

 

 

 

 

 

 

 

 

 

 

 

 

 

Then use this collection in a Gallery (Raccolta_Domande)

 

Foto_Gallery.png

 

Then I have another SP list in which I would like to store the results based on the input in the gallery (RisultatiAM)

 

 

Risultati_AM.png

 

 

 

 

 

To store the results I'm using a "submit" bottom with the following function

 

Funzioni.png

 

And as you can see I'm getting this error about the Id field required.

Can't understand why since the ID column is in both the SP list (RisultatiAM) and the collection (AM_Collectiom).

 

Since I'm new I'm preatty sure I'm missing the basic behavior of this functions.

Could anyone help me please?

If you need more information letme know.

 

Thank you,

Regards!

Categories:
I have the same question (0)
  • CU22040918-0 Profile Picture
    195 on at

    Hi @Ranma92 

     

    It’s not suggested to save collection to data source in bulk with Collect(). Microsoft only suggest use Collect() to create collection, even if it has capability to write database.

    Try to use Patch() into ForAll() to create records within the loop.

     

    Hope this help!

     

    Nelson

     

  • Ranma92 Profile Picture
    2 on at

    Hi,

    Thank you for the answer.

     

    I'm trying something like this 

     

     

    ForAll(Raccolta_Domande.AllItems;
    Patch(RisultatiAM; Defaults(RisultatiAM);
    { IDAudit:IDAuditVar;
    DomandaID: Value(ID_Domande.Text);
    Risposta: OK_KO.Selected.Value;
    Commento: Commenti.Text;
    Domanda: Domande.Text;
    Titolo:".";
    NumeroImmagini:0}));;

     

    the problem is that it is saving the three questions in the SP list but the "Risposta" field (From the Radio) is blank for the three question and the Commento field (from a Text Input) is present only in the first question and not in the other two

     

    Risultati_AM_2.png

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 1,045

#2
Valantis Profile Picture

Valantis 675

#3
11manish Profile Picture

11manish 592

Last 30 days Overall leaderboard