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 / Help with Custom Funct...
Power Apps
Unanswered

Help with Custom Functions and Sending JSON Objects to Sharepoint

(0) ShareShare
ReportReport
Posted on by 2

Hi,

 

My project is the following:

 

- I have 10 custom forms, each in their own tab, for users to fill and submit. At least 1 is required.

- For 8 fields, there are multiple values associated with them;

For example -> unit1: {jan:10, feb:28, march:23...} and so on for every month, same for unit2, unit 3, and the rest.

 

In order to not have to make more than 24 columns for each month/unit, I decided to submit each month's value in a JSON object, or dictionary like in Python, to Sharepoint List. Hence, there will only be 8 columns corresponding to each "unit"

 

Am I able to do this? If so, how?

 

Also, how do I make custom functions to collect the data from the fields and patch to the Sharepoint List, since I have 10 custom forms? I'm trying to follow DRY principle here, with the condition that the first form is required no matter what. I saw that there is an experimental feature to create functions in components, but I'm not sure how to implement it. If there's any other way too, what is it?

 

I appreciate all the help! I'm fairly new to PowerApps, so I'm still learning all of this.

 

Categories:
I have the same question (0)
  • PowerGirl Profile Picture
    130 on at

    What I would do is create a collection for each unit. Then you use Patch to save to your SharePoint list and the value of the column would be JSON(unit1). 

  • coalsticks Profile Picture
    2 on at

    Thank you!

     

    I will give this a try and let you know if it works.

     

    Do you know how I could make functions to that I'm not repeating the same logic over and over again for each form?

  • PowerGirl Profile Picture
    130 on at

    You can put your functions in one button (let’s say Button1) in the screen (it can be hidden) and when you want it to run from different controls, on the On Select or the On Change  property you say Select(Button1). But you can only select buttons in the same screen. 
    I would put all the forms in one scrollable screen (use containers if necessary) for it to work, but it depends on how many controls you have in one screen, the performance might be slower. 
    If the forms are in multiple screens, you need to repeat the code at least once (for the button containing it) per screen, as far as I know. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard