hello thanks for reading this
i want to use data from galary and want to change a litle and save it again i dont want to overwrite it i want to create a new record what do i nee to do because
SubmitForm(EditForm1_1) is not the right code then it wil overwrite
thnx
sasasale
Solved! Go to Solution.
Hello @RandyHayes thank you for giving me some solutions and yes i changed excel into sharepoint and after that i used
Patch(yourGallery.Selected, {ID:Blank()})
but this still doesnt work i mentioned when i change the comma , into ; it worked perfectly i think this is because im from Europe and you are from the USA but im happy you helped me in this mission accomplished
so the correctline for me is
Patch(BrowseGallery1.Selected; {ID:Blank()})
thank you and you are so underrated on youtube you helped a lot
regards Sasa Collijn
To change a form into FormMode.New and prepare it to create a new record, run the NewForm() function first.
Hope that helps,
Bryan
If you want to perform this, you will need to make sure your Form is in Edit mode and never in New mode. When you specify New for a form, it produces an internal-to-the-form record based on the Defaults of your datasource. You will have no access to that record to be able to modify it from your app (i.e. incorporating the Gallery data into the form.)
So, keep your form in Edit mode and utilize the following on your Item property of the form:
Patch(yourGallery.Selected, {ID:Blank()})
This will give you a form with all of the data from the gallery, and when you SubmitForm on the form, it will create a new record with that data and any changes you have made to it in the form.
I hope this is helpful for you.
thanks for you reply but this doesnt work iwas looking at your youtube but cannot find anny simple code for it
i think you didnt understand the question i have my data in a tabel and want to use and change that data a litle and after i want to save it as a new Unique record so not overwritten like it standard do
Well, there is a lot of missing information about your app and its design and purpose, so it is hard to pinpoint any exact solution to what you need. The provided suggestion is the basic for doing what you want.
So, some essential details...what is your datasource? Are you ONLY requiring to select a gallery item and then make edits and save as new, or do you have other needs?
thank you again for trying to help me out in this @RandyHayes i appriciate this a lot
here are some details, I want to make an application for customers to custom and design there own cinnewals by starting from an example template and then configere it with customer dimensions and optional wishes.
database is in excel and the idea is to use the data and start from a template example from the database and to add details to it and save it as an workorder for the customer with customermade dimensions and options of a cinnewalls
so i made the standard galary and detail and edit screen but if i want to save it it overwrite the original and that is not what i want it need to have an uniqe customer order so i can cannot other processes onto it .
so the
Ah...Excel!! The method that I provided is sufficient for SharePoint, Dataverse, SQL and others...but NOT Excel.
The Excel connector does not expose the primary key to the app, so there is no way to "blank it out" and have the form then submit a new item.
The only way to do this is to duplicate the selected item from your gallery - column by column!
For example, if you have an Excel table with a "Name", "Date" and "Customer" column (for example), then in your OnSelect of the gallery selection, you will need to implement this:
With(ThisItem,
UpdateContext({lclCurrentRecord: { Name: Name, Date: Date, Customer: Customer } })
)
The above will exclude the hidden identity column and thus make the form think that it is a new record.
Then (Form still always in Edit mode), the Item property of the form would be lclCurrentRecord.
The above MAY or MAY NOT work for you. It is a challenge with Excel as it kind of has a mind of its own.
Best to switch to at least SharePoint if you can.
When you SubmitForm, it will create a new item in your list with the values from the selected record and any changes made in the form.
Hello @RandyHayes thank you for giving me some solutions and yes i changed excel into sharepoint and after that i used
Patch(yourGallery.Selected, {ID:Blank()})
but this still doesnt work i mentioned when i change the comma , into ; it worked perfectly i think this is because im from Europe and you are from the USA but im happy you helped me in this mission accomplished
so the correctline for me is
Patch(BrowseGallery1.Selected; {ID:Blank()})
thank you and you are so underrated on youtube you helped a lot
regards Sasa Collijn
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
197 | |
69 | |
47 | |
36 | |
25 |
User | Count |
---|---|
239 | |
110 | |
89 | |
88 | |
66 |