cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
anonymia25
Helper III
Helper III

Using combobox, checkbox and text in form datacard

Hi all,

Currently I am working on both New/Edit form.

The datacard Update property is text control. I added a checkbox to the DataCard to allow user to add other supplier. 

OnCheck or UnCheck will show/hide the text input field. I also added a combobox with list of supplier (in item property using filter) which are link to another datasource. (Since the form is using other datasource, and I am using Dataverse)

example.JPG

My question is how do I submit the data from the combobox field? Because when I submitted the form, the data is not updated due to the form/datacard expected text value. Is there a way to add more controls in the Update property? Any idea on how to approach this? Many thanks.

 

 

1 REPLY 1
StalinPonnusamy
Community Champion
Community Champion

Hi @anonymia25 

We have to use the Patch command. Since some controls are only on the form which means not tied to the backend.

 

Syntax:

SelectedId - Telling the system to update the specific record on the edit 

 

 

Patch(
    Datasource,
    If(
        EditForm1.Mode = FormMode.New,
        Defaults(DataSource),
        LookUp(
            Datasource,
            ID = SelectedId
        )
    ),
    {
        Supplier: DataCardValue2.Selected.Value,
Other: TextInput3.text
    }
);

 

If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,318)