cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PM
Level: Powered On

Help: NewForm creates records - but default values not being updated

I have 2 sharepoint lists - we will call them Customer Info and Meeting Info.

 

Couple of columns from Customer Info are combined to create a new column in Customer Info list - called SpecialID. This SpecialID column is used as a look up on the Meeting Info List.

 

Created a power app and on 1 page (CustomerPage) - connected to Customer Info list - the users click on data card - and it takes them to another page(Meeting Page) (NewForm) which is connected to Meeting Info list. The users need to fill out information and click on Submit Form and these additional information will now need to be saved in Meeting Info list. In effect for 1 record in Customer Info - multiple records need to be created in Meeting Info list.

 

Current situation - CustomerPage shows all information as required, users are able to click on Loginfo ( a button) - and it opens the MeetingPage and it defaults to the customer data ( did this using the Default for drop down fields & Odatatype). Once we fill out remaining information and click submit - while the records is created in the list - not all columns are filled out.

 

The defaulted column is not being filled out and so are couple of date columns. What am I missing? Should I use patch command and if so - how would i use it for few columns and not others?

2 REPLIES 2
Community Support Team
Community Support Team

Re: Help: NewForm creates records - but default values not being updated

Hi @PM,

 

Could you please share more details about the App you created, specially after navigate to the New form screen (which connects to the Meeting info)?

 

If Meeting info List has multi to one relationship with the Csutomer info list, and you would like to update all the meeting items for the same customer selected in Gallery in the Meeting info list, then you would need to take use of the Patch () and the forall () function.

Logic of the function should be as below:

forall(RenameColumns(filter(MeetingInfo, LookupField.value=Gallery1.Selected.SpecialID),"ID","ID1")
       Patch(MeetingInfo, first(Filter(MeetingInfo, ID=ID1)), {RecordElements})
)

 

Another workaorund for current situation is, first use a gallery to filter out the meeting list with the selected Customer, then select the Meeting item to update.

Doing it in this way will not require using Patch(), it would work with the EditForm control, but this will noly update items one at a time.

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PM
Level: Powered On

Re: Help: NewForm creates records - but default values not being updated

Its more like new data entry for an existing parent.

 

The customer list is static/only few folks can update it. Each customer is shown as a data card with information about them. The users of the app will click on a button on each data card and from there be re-directed to a newform where the customer information is auto filled out and they are expected to fill out some other relevant information. On submit all of this data needs to get stored in new list.

 

So every time a new meeting is held the organizer will click on customer and fill out updates. So the Meetinginfo list will have many entries for one customer.

 

Not sure if that is clear or more convoluted

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (4,776)