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

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

@katunar That gives error: expect Record value

PowerAddict
Level 8

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)
sy8111
Level: Powered On

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?

katunar
Level: Powered On

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
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
Users Online
Currently online: 146 members 5,400 guests
Please welcome our newest community members: