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

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Populate Form Values from another Form

(0) ShareShare
ReportReport
Posted on by 659

Hey all – looking to populate values from one form to
another. The Add new Project form is from a SharePoint list - PS Contract Totals

The Project details form is from a SharePoint list - PS Contracts

There is a lookup field on PS Contracts that finds the
project key on PS Contracts Totals. It is the same field/value identified in
ProjectsMaster on the Project Details form – I'm using variables to populate from
OnSuccess of the PS Contract Totals form (frmNewprojTots)

 

Set(

    varProjRecord,

   
frmNewprojTots.LastSubmit

);

UpdateContext({ctxChildpop: true});

NewForm(frmNewProjs)

 

Thing is - I also need Project Key, Finance Type, CR_TYPE and ChgReqNum
to be populated on the Project details Form (frmNewProjs) in addition to the ProjectMaster
being set. How can I do that? Do I need to create separate variables for each
field on the frmNewprojTots? Is that the most efficient thing to do, or is there
a better way? Thx in advance

 

ctedesco3307_0-1661204947371.png

 

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,291 Super User 2024 Season 1 on at
    Re: Populate Form Values from another Form

    @ctedesco3307 

    You already have all the fields and data (and more) that you need in the one variable.  There is no need to create new one repetitively.  

     

    What you want to do is all done in the Item property of your form.  First, make sure the form is in Edit mode.

    Set your Item property to include whatever columns you want.

    Ex:

    With(varProjRecord,
     {ProjectKeyColumnName: 'Project Key', 
     FinanceTypeColumnName: 'Finance Type', 
     CR_TYPEColumnName: CR_TYPE,
     ChgReqNum: ChgReqNum
     }
    )

    Change column names as needed.

     

    I hope this is helpful for you.

  • WillPage Profile Picture
    2,243 Super User 2025 Season 2 on at
    Re: Populate Form Values from another Form

    You can access all the properties of that variable you set, e.g varProjRecord.'Project Key', varProjRecord.CR_TYPE etc.

     

    If that doesn't work, you should at least have the ID, so in your OnSuccess formula, go

    Set(
     varProjRecord,
    LookUp('PS Contrcat Totals', ID = frmNewprojTots.LastSubmit.ID)
    )

    Now you can go varProjRecord.Whatever and the data from the column called Whatever will be there. Set the Default property of the controls in the other form as such.

     

  • ctedesco3307 Profile Picture
    659 on at
    Re: Populate Form Values from another Form

    @Ra   Thank 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 629 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 397 Super User 2025 Season 2

#3
wolenberg_ Profile Picture

wolenberg_ 232 Moderator

Last 30 days Overall leaderboard