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 / Canvas App - pre popul...
Power Apps
Answered

Canvas App - pre populate new form

(0) ShareShare
ReportReport
Posted on by 61

Hello

Im building Canvas App kind a like a wizard to make thing easy for basic users. 
I need to create a sequence where I take variables from gallery shift into next screen that works fine than I edit those records in Edit Form also fine but then I need to shift to another screen with New Form and somehow pre populate fields in New form with the records I editted in Edit form. Is there a way to do that ? (I thought about collection but there is a mix of datatypes in those record lookups, choice, multiple choices almost everything)

 

Thanks I will be glad for any advice 

Categories:
I have the same question (0)
  • Gelos Profile Picture
    457 on at

    You want to show edited value in next scree. am I correct or not.

  • OndrejBriza Profile Picture
    61 on at

    Yes values that were displayed or edited in Edit Form should be filled or pre populated in the next screen on New Form so user dont have to fill them again and can create copy of that record. 

     

  • Gelos Profile Picture
    457 on at

    One way is store value in set variable. And navigate next screen the put the respective variable name with respective text field.

    If this answer helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

  • OndrejBriza Profile Picture
    61 on at

    I know how to use set but problem is that I use Set(MyVariable, ThisItem) on the gallery in first step. 
    Second step is to display data in edit form that I can still do by using data in MyVariable but I dont know how to store the new data from the saved edit form and fill data in next sceen into New Form so user can sequentially do Choose data from gallery -> Edit Data in Edit Form -> Create copy with pre filled fields from edit Form  in New Form in last screen. 

  • Gelos Profile Picture
    457 on at

    I didn't understand. User edited the data and click save button. When click save button data will be saved then navigate next screen. In the next screen you should show the new data. am I correct or not

  • OndrejBriza Profile Picture
    61 on at

    Yes but the new data have to be filled in Form with attribute Create new record or as its wierdly called NewForm and I dont know how to collect them and fill into the next one.   

  • Gelos Profile Picture
    457 on at

    You not need create new form. You can create display form.

    Go to insert -> form-> Display

    Then 

    Select data source  which table's data can be displayed.

    Definitely you have unique value So you store the value in set variable. like Set(unique value, Text input box. Text )

    Text input box which contain unique value.

    Then go to Item property of display form. User filter function.

    Last(Filter(table name ,Unique column name from table=unique value)) 

     

    If this answer helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

  • OndrejBriza Profile Picture
    61 on at

    Unfortunatly I do have to use New Form because after submiting the New form it will create a copy with that edited data. Users task is selecting record editing the Form by changing date and than creating a exact copy and selecting new date as a process of ending one record and starting new but with different date and keeping the old copy still in the system. 
    Will your solution work also with New Form or just with display Form ? 

  • Gelos Profile Picture
    457 on at

    No. But You can user look up function.

    You use set variable to store unique value after navigate in the new form. You can try  lookup function 

    go to input box default property.

    Lookup(table name, unique column name=unique value, column name which data you want)

     

    If this answer helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @OndrejBriza 

    You can do this easily by getting the last submitted record in the OnSuccess action of your form.

    Skip the concept of "NewForm" and stay away from it as you don't need it in this case.

    Instead, in your OnSuccess action of the form, set a variable as such :

       Set(glbNewCopy, Patch(Self.LastSubmit, {ID: Blank()})

    This will create a variable with the exact copy of the submitted record and will blank out the Primary Key (ID)...which means to PowerApps, it will be a new record when used.

     

    Then set your Item property of your form to : glbNewCopy

    If you want to reuse the same form (recommended), the set the Item property to:

        Coalesce(glbNewCopy, Defaults(yourDatasource))

    This will give you a blank record if none has been submitted so far.

     

    If you are loading the record from a gallery instead, then change the above to:

        Coalesce(glbNewCopy, yourGallery.Selected)

     

    Keep your form in Edit mode always.  There is no need for NewForm and it should not be called either.  It's ALL about the primary key column - in this case the ID.  If ID is blank, then the form KNOWS that it is new.  If ID has a value, then the form KNOWS it is Edit.  It's just that easy.

     

    I hope this is helpful for you.

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 494

#2
WarrenBelz Profile Picture

WarrenBelz 352 Most Valuable Professional

#3
11manish Profile Picture

11manish 323

Last 30 days Overall leaderboard