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 Platform Community / Forums / Power Apps / Patch gallery data to ...
Power Apps
Answered

Patch gallery data to the list

(0) ShareShare
ReportReport
Posted on by 102

Hi,

 

I have gallery with some data pulled from skill requirements data source: Job type, Job profile, Skill and Skill ID

Level and Level in number are not from data source.

Level is dropdown with predefined levels in words. 

Level in number is text label with if function inside.

Dulat_0-1692715589986.png

 

I am trying to patch this data to assessment datasource/storage.

I was able to patch all data except score value.

Is it possible to write scores, in the row with appropriate Skill_ID?

 

ForAll(
GallerySkills.AllItems,
Patch(
Assessment_data,
Defaults(Assessment_data),
{
Title: "Assessment",
Employee:User().FullName,
AssessmentBy:User().FullName,
AssessmentID:AssessmentID.Text,
SkillID: Skill_ID,
RowCount:Value(NewRowCount.Text)
}
)
)

 

Thanks in advance!

 

 

Categories:
I have the same question (0)
  • LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Dulat,

     

    Does SkillID refer to the ID field of another list and you would like to update the score field of the corresponding row in that list?

    ForAll(
     GallerySkills.AllItems,
     With(
     {
     wPatched: Patch(
     Assessment_data,
     Defaults(Assessment_data),
     {
     Title: "Assessment",
     Employee:User().FullName,
     AssessmentBy:User().FullName,
     AssessmentID:AssessmentID.Text,
     SkillID: Skill_ID,
     RowCount:Value(NewRowCount.Text)
     }
     )
     },
     //Adjust the list, column and value references
     Patch(
     SkillList,
     LookUp(SkillList, ID = wPatched.SkillID),
     {ScoreColumn: SCOREVALUE}
     )
     )
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • LaurensM Profile Picture
    12,516 Moderator on at

    Looking back on my code, since we already have the skill id reference we can simplify it further:

    ForAll(
     GallerySkills.AllItems,
     Patch(
     Assessment_data,
     Defaults(Assessment_data),
     {
     Title: "Assessment",
     Employee:User().FullName,
     AssessmentBy:User().FullName,
     AssessmentID:AssessmentID.Text,
     SkillID: Skill_ID,
     RowCount:Value(NewRowCount.Text)
     }
     );
     Patch(
     SkillList,
     LookUp(SkillList, Skill_ID = ID),
     {ScoreColumn: SCOREVALUE}
     )
    )
  • Dulat Profile Picture
    102 on at

    @LaurensM Thanks for having a look.

    I have two lists.

    one of them is requirement list.

    Dulat_0-1692719825254.png

    Second list is assessment results.

    Dulat_1-1692719917581.png

    So, I am trying to use first as a reference for skills set and requirements.

    I have tried to modify second half of your code to patch assessment data, but it gives network/runtime error.

     

    Thank you a lot!

  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Dulat,

     

    But the scores column is also in the Assessment list. You could patch the scores column during assessment creation.

     

    ForAll(
     GallerySkills.AllItems,
     Patch(
     Assessment_data,
     Defaults(Assessment_data),
     {
     Title: "Assessment",
     Employee:User().FullName,
     AssessmentBy:User().FullName,
     AssessmentID:AssessmentID.Text,
     SkillID: Skill_ID,
     RowCount:Value(NewRowCount.Text)
     Score: SCOREVALUE
     }
     )
    )

     

    Should something be changed in the requirement list?

  • Dulat Profile Picture
    102 on at

    @LaurensM 

    Thanks a lot!

    I was doing mistake in SCOREVALUE.

  • Dulat Profile Picture
    102 on at

    @LaurensM 

     

    Can I ask one more help?

     

    I tried to made a function to update assessment, if it is already done according to code above.

    It runs, however it does overwrite first skill info and duplicate last.

    Also it writes value in last skill.

     

    Probably I am doing something wrong here.

    ForAll(GallerySkills.AllItems,
    Patch(Assessment_data,
    LookUp(Assessment_data, AssessmentID = AssessmentIDlabel.Text),
    {Title: "Assessment",
    Employee:User().FullName,
    AssessmentBy:User().FullName,
    AssessmentID:AssessmentIDlabel.Text,
    SkillID: Skill_ID,
    Skill:SkillDescr.Text,
    RowCount:Value(NewRowCount.Text),
    ScoreEmp:Value(Score_result.Text)
    }
    )
    )

     

     

    Dulat_0-1692726509981.png

     

    Dulat_2-1692726566210.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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 93 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
Valantis Profile Picture

Valantis 49

Last 30 days Overall leaderboard