web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Patch multiple forms t...
Power Apps
Unanswered

Patch multiple forms to forecast 12 months in one screen

(0) ShareShare
ReportReport
Posted on by 12

Hi community !

It seems like I am doing something wrong.

 

I would like to create a form (or multilple forms) in one screen to enter sales forecast for 12 months. The user will have to chose a department, and a year, and then enter his prevision for each 12 months of the year. 

Example : Department Women, Year 2024, I plan on selling 300 000$ in January, 250 000$ in February, etc.

 

When I submit my form, I should see 12 new rows in ma data table.

 

Here is my datatable (dataverse) : 

 

MarieKatherineJ_0-1687981958421.png

 

 

I started with a sample of 4 months, so I created a first Form to select (1) a Departement and (2) a Year, and then 4 other forms to enter the sales forecast : 

 

MarieKatherineJ_1-1687982111327.png

 

I followed some tutorial on youtube, and here are some of the steps I followed :

  •  My forms are in FormMode.Edit
  • In Items of every forms, I wrote " Defaults(SalesForecast) " 
  • DataSource is "SalesForecast"
  • In Default section of Month_Datacard, I manually entered "Janvier" for the first month, "Février" for the second month, etc.

I then wrote this code on my On Success of submit button : 

Patch(SalesForecast;
 Defaults(SalesForecast);
 FormulaireSaisie.Updates;FormJanvier.Updates;FormFévrier.Updates;FormMars.Updates;FormAvril.Updates)



& NewForm(FormulaireSaisie)
& NewForm(FormJanvier) 
& NewForm(FormFévrier)
& NewForm(FormMars)
& NewForm(FormAvril)


& Navigate(SucessScreen)

 

But I have an error message. In french it says : 

MarieKatherineJ_2-1687982559923.png

 

 

Can you please help me 🙂

 

Oh and also, do you know I do I remove duplicate from my dropdown list in the form ? : 

MarieKatherineJ_3-1687982870017.png

 

Thank you !!!

 

 

 

Categories:
I have the same question (0)
  • Verified answer
    MarieKatherineJ Profile Picture
    12 on at

    I got it ! I will publish my solution if anyone else has the same question.

     

    I had to use the ;; instead of & 
    I also had to decorticate my Patch like this : 

    Patch(SalesForecast;VarFormData;FormulaireSaisie.Updates;FormJanvier.Updates) ;;
    Patch(SalesForecast;VarFormData;FormulaireSaisie.Updates;FormFévrier.Updates) ;;
    Patch(SalesForecast;VarFormData;FormulaireSaisie.Updates;FormMars.Updates) ;;
    Patch(SalesForecast;VarFormData;FormulaireSaisie.Updates;FormAvril.Updates) 

     

    I am still looking how to remove duplicate in my dropdown list 🙂

  • Suggested answer
    GS-15100054-0 Profile Picture
    2 on at
     
    You can use the Distinct function: Distinct(DataSource, ColumnName) to filter out duplicate values based on a specific column.
     
    In your case it will be Distinct(SalesForecast, Department)
     
    Thanks

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard