cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Re: Need an alternative to BrowseGallery1.Selected in an editform

You need to substitute your datasource for "DataSource" and the you need to place the unique identifier column for the "ID" field.

rowlinx
Level: Powered On

Re: Need an alternative to BrowseGallery1.Selected in an editform

Can I keep the unique identifier as ID, as that is what I'm using now. I added my data source, the OnSuccess still has the error of Invalid Argument Type.

 

Would any other info help you figure out why it's not working on mine? This app started out from being an autogenerated powerapp from sharepoint. Also, thank you for helping me through this.

Anonymous
Not applicable

Re: Need an alternative to BrowseGallery1.Selected in an editform

the picture you sent me says that your data source is "proptest#2" try to use that as your data source instead of proptest2. If that does not work, I do not know what the problem is and do not know how to help you.

nickduxfield
Level 8

Re: Need an alternative to BrowseGallery1.Selected in an editform

Just curious, this happened to me once.

  • What is the filter code on the gallery1's items field?
  • Whats the default value?

If you put anything in the default filed here it might override whats in the edit form ITEM field.

For example Last('Datasource')

rowlinx
Level: Powered On

Re: Need an alternative to BrowseGallery1.Selected in an editform

Hm okay, yeah you can't debug my problem beyond what you've done thank you. Perhaps if you are able you could help me in another way? 

The reason I want to be able to save without save+quitting is because I need to add a constant to the ID number before the form is finally saved and exited. But I can't add something to the ID number until the ID is created and for that to happen it must be saved in some way.

 

An alternative to the solution of saving and staying on the form would be saving and being navigated to a different form with the lastsubmitted record. 


or more reasonably:

 

While it is being saved have the constant (which is 1699974) be added to the ID automatically. 

Is this a viable solution that is doable? Would you know how to go about doing this?

 

Thank you 

Anonymous
Not applicable

Re: Need an alternative to BrowseGallery1.Selected in an editform

I believe you could use.

"OnSuccess" = "Patch(YourDataSource, BrowseGallery1.LastSubmit, {ID:ID+1699974})"

nickduxfield
Level 8

Re: Need an alternative to BrowseGallery1.Selected in an editform

Sorry to jump on here, I'm starting to think I've solved some of these issues in the past.

You can use the same form as Apric442 mentions.

 

If you want flexibility over the ID suffix you need to another table with some relationship. I don't know your data so Ill use a date created field. You can compare created month to the month column in the IDSuffixes table.

Table: IDSuffixes

Month: January... Suffix:1699974

 

 

 

Now you can use Apric442's of the OnSuccess part of the form, not the Save button.

If you string everything together on the save button its not going to work the way forms should.

rowlinx
Level: Powered On

Re: Need an alternative to BrowseGallery1.Selected in an editform

Thank you, looking at what the patch function does I think this is what I need.

Patch('proptest#2', BrowseGallery1.LastSubmit, {ProposalNumber:ID+1699974})

 

I put this in the OnSuccess portion of my form and made the save button just SubmitForm(NewForm1), as you can see I'm trying to store ProposalNumber as the sum of the ID number and the constant. 

 

However this leads to the error

"Invalid Name"
And

"The function 'Patch' has some invalid arguments" 

rowlinx
Level: Powered On

Re: Need an alternative to BrowseGallery1.Selected in an editform

Hello, I just saw your reply

 

This is in the Items field of BrowseGallery1

 

SortByColumns(Filter('proptest#2', StartsWith(Title, TextSearchBox1.Text)), "ProposalNumber", If(SortDescending1, Descending, Ascending))

 

There is no default value for entering new forms as each record has a unique name. To explain some context to my data I'm creating a database to store project information, the projects will have a name, location, and price. More importantly, there is a proposal number that was a part of the old database system that we used. The new database that is being created from powerapps needs to continue storing proposal numbers alongside a new project, similar to an ID number except instead of starting at 1 it has to start from where the old ones left off. An added difficulty is that multiple people will be using this at once. So the easiest way to create proposal numbers I think is to add a sum to the ID number and save it under a field called proposal number.

Anonymous
Not applicable

Re: Need an alternative to BrowseGallery1.Selected in an editform

What data source are you using?

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 (5,375)