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 / patching multi screens...
Power Apps
Suggested Answer

patching multi screens to one SQL server db table

(1) ShareShare
ReportReport
Posted on by 73
Hello everyone,
 
I would like to patch 5 different screens to one SQL Server DB Table. Assume that everything is fine and working (connections etc...)
 
I used this Patch function for the 1st screen and of course it gave me error that other columns in the DB which are "not null" are missing! In fact the thing was to patch the data to those columns in the following 4 screens. 
 
Patch(
    Commercial,
    Defaults(Commercial),
    {
        Commercial_ID: RandBetween(1, 100000), 
        ///Currency_ID: GUID(), Normally i will use this GUID() function but need to change the database table column data type to uniqueidentifyer, till than i will use random number to create an int. 
        Requester: Label5_1.Text,
        Projects: TextInputCanvas7_1.Value,
        Final_Customer: DropdownCanvas3_1.Selected.Value,
        Delivered_Customer: DropdownCanvas4_1.Selected.Value,
        Customer_Currency: DropdownCanvas5_1.Selected.Value,
        Reference_Currency: DropdownCanvas5_2.Selected.Value,
        Vehicles: TextInputCanvas7.Value,
        Add_Vehicles: TextInputCanvas12.Value,
        Project_Comments: RichTextEditor2_18.HtmlText
    }
)
 
The following 4 screens are composed of the same concept, containing dropdowns, text inputs etc. 
 
I came up with this; I can make all the columns in the DB to accept null values, but again this time it will patch but for the second and the other screens, it will create a new line. 
 
I watched the video of shane young on youtube https://youtu.be/fu8OEbD7YqQ?si=pQOEV1SbKjezLJRW but i got lost at the 4'27" where he did something which i didn't understand. 
 
In fact what i do want to do is exactly what he describes and shows in this video. 
 
If any one has some idea to help me i would be very happy. 
 
Thanks again.
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,974 Moderator on at
    Hi,
     
    I am not sure I understand and sorry I don't real others posts, or watch peoples videos (we have limited time since we answer things for free).
     
    1. Is your App Model driven or Canvas App?
    2. Is this data across 4 screens going to the same Row in the Table?? Or will you create multiple rows?
     
    It sounds to me that you are .... sort of doing a Wizard thing, or a Business Process, that takes them across screen to screen
     
    This mean you have a few options
     
    Option 1
    Let's pretend you are filling in data and clicking like a Next Button to get to the next screen
    You could pass a Collection, to the next screen which represents the first screens data, and you would do this across all the screens
     
    From 1 to 2
    Navigate(ToScreen2, Transition.None, { Screen1Data: CollectionOfScreen1Data})
     
    From 2 to 3
    Navigate(ToScreen2, Transition.None, { Screen1Data: CollectionOfScreen1Data, Screen2Data: CollectionOfScreen2Data})
     
    From 3 to 4
    Navigate(ToScreen2, Transition.None, { Screen1Data: CollectionOfScreen1Data, Screen2Data: CollectionOfScreen2Data, Screen3Data, CollectionOfScreen3Data})
     
     
    The benefits here are you aren'ting creating global variables
     
    Option 2
    Define a Collection that has either A) Sections fo reach screen, or B) Properties for everything
     
    Then Pass this to each screen, and instead of the above you only pass 1 thing, and each screen fills in their data and passes it along
     
    Option 3
    Create a Global Variable Collection That holds it all, like Option 2 but you dont pass it, its just global
     
    Option 4
    Don't create multiple screen.
     
    On 1 Screen, create 4 Containers. Build your pseudo Screen in that Container
    When the person starts up the visible property of Container1 is visible and all others are invisible
     
    each time they click Next, you make the next one visible
     
    Option 5
    You build a Collapsible Pattern were all sections are visible at one time but accordion collapsible.
     
    Option 6
    Build 4 Canvas App Components in your Project, its easy and all low code
    In the Only Screen drop your 4 components, and just like Option 4, make them visible as needed
     
    I don't know which one you works best for you but these are all options.
     
  • agorkemt Profile Picture
    73 on at
    Hi @FLMike,
     
    Thank you very much and belive it, i do appreciate you for sharing your knowledge and spending time here!
     
    1- My app is Canvas App.
    2- I would like to save all the data into one row. In fact it is a crud app where in each screen they are going to fill one part of a big excel file where they used to use for the same purpose. 
     
    It is a Business Process.
     
    As of your proposed solutions;
     
    Option 1 seems to be the easiest, i think. After collecting all the data to respective collections, Screen1Data, Screen2Data, ... how am i supposed to patch all the 5 collections? Would like to have the syntax if it is possible.
     
    Option 2 can work too. It is the same logic, one collection but will store all the data from different screens into one row! if you can show me how with an example I would appreciate it.
     
    Options 4-5 and 6 are useless as the UI is approved with the multi page design. 
     
    Thank you very much

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 551

#2
WarrenBelz Profile Picture

WarrenBelz 430 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 298

Last 30 days Overall leaderboard