cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Re: How to automatically populate default lookup ID in edit form data card

@katunar That gives error: expect Record value

Highlighted
Super User
Super User

Re: How to automatically populate default lookup ID in edit form data card

Do you really need a combo box? Could you use a drop down?

In either case, with your dropdown, they the following:

1. Items property = Lists
2. Display value = ["id"]
3. Update value = the way you have it

I havent checked the syntax just yet but will do so in the next few minutes and get back to you. Just wanted to share the thought with you. In my experience, I have always found it easy to update almost of all the properties of a combo box especially when it's a lookup.

If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution. Thanks!

Hardit(Haman)
Highlighted
Regular Visitor

Re: How to automatically populate default lookup ID in edit form data card

@katunar @PowerAddict I still have no luck using combo box or drop down to insert transaction ID back to log list, I can see the datacard's update property tooltip says, the field has to be changed by user for it to write back to data source. if not changed, it will be empty. Is this the cause of the problem?

 

I want to test using label. If use Label, how do I set formula in data card's Update property?

Highlighted
Helper III
Helper III

Re: How to automatically populate default lookup ID in edit form data card

@sy8111 

If you want to use a label, you can simply set default to GalleryXX.Selected.'NameOfTheColumn' and set the Update to 'NameOfTheLabel'.Text

 

I rebuilt your case with a form, a gallery and a submit button and everything works fine.

I can't tell you why the tooltip appears, but I would suggest that your data source has a restiction within the transactionID column (which makes sense - a primary key should always be unique). When you submit a form, you always generate a new record in your data source.

If you want to update an existing record, try using UpdateIf('DataSourceName', Condition, {Column1: Label2.Text, Column2: ComboBox1.Selected.Value})

 

I hope this will help you with your problem.

 

Feel free to ask more questions.

 

Best regards.

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,682)