cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ALP1
Continued Contributor
Continued Contributor

if + Patch + enterprise keywords

Hi,

I added enterprise keyword column in my form. I want to submit the values i have selected to powerapps.

I use this formula 

 

UploadFilestoSharePointLibrary.Run(
    JSON(
        colAttachmentGallery;
        JSONFormat.IncludeBinaryData
    );
    
    If(IsBlank(dpd_keywords.Selected.Label);Text("");Patch('Centre de documentation MPM';
        {
            'Mots clés d’entreprise': Table(
                {
                    Label: dpd_keywords.Selected.Label;
                    Path: dpd_keywords.Selected.Path;
                    TermGuid: dpd_keywords.Selected.TermGuid;
                    Value: dpd_keywords.Selected.Value;
                    WssId: dpd_keywords.Selected.WssId
                }
            )
        }
    )

I have this warning : value(text) is attented. 

 

the component dpd_keyword is a combobox 

* items = Choices([@'Centre de documentation MPM'].TaxKeyword)

* update = dpd_keywords.SelectedItems

 

Can you help me ? 

 

1 ACCEPTED SOLUTION

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

Hi @ALP1 

 

Just for curiosity, I went ahead and tried for multi-select tags, and here is the code

 

If(
    !IsEmpty(DataCardValue15.SelectedItems),
    Patch(
        EventIItinerary,
        LookUp(
            EventIItinerary,
            ID = BrowseGallery1.Selected.ID
        ),
        {
            'Enterprise Keywords': ForAll(
                DataCardValue15.SelectedItems As Source,
                {
                    Label: Source.Label,
                    Path: Source.Path,
                    TermGuid: Source.TermGuid,
                    Value: Source.Value,
                    WssId: Source.WssId
                }
            )
        }
    )
)

View solution in original post

5 REPLIES 5
lcimon
Resolver I
Resolver I

Hello,

 

Where do you have this warning ?

ALP1
Continued Contributor
Continued Contributor

I have a button to submit myform. I use this formula in the onselect property

StalinPonnusamy
Community Champion
Community Champion

Hi @lcimon 

 

 I assume you are expecting only one keyword from the combobox

 

If(
    !IsEmpty(DataCardValue15.SelectedItems),
    Patch(
        EventIItinerary,
        LookUp(
            EventIItinerary,
            ID = BrowseGallery1.Selected.ID
        ),
        {
            'Enterprise Keywords': Table(
                {
                    Label: DataCardValue15.Selected.Label,
                    Path: DataCardValue15.Selected.Path,
                    TermGuid: DataCardValue15.Selected.TermGuid,
                    Value: DataCardValue15.Selected.Value,
                    WssId: DataCardValue15.Selected.WssId
                }
            )
        }
    )
)

 

StalinPonnusamy_0-1633788309442.png

 

Note: Need to change the code for multi select

 

StalinPonnusamy
Community Champion
Community Champion

Hi @ALP1 

 

Just for curiosity, I went ahead and tried for multi-select tags, and here is the code

 

If(
    !IsEmpty(DataCardValue15.SelectedItems),
    Patch(
        EventIItinerary,
        LookUp(
            EventIItinerary,
            ID = BrowseGallery1.Selected.ID
        ),
        {
            'Enterprise Keywords': ForAll(
                DataCardValue15.SelectedItems As Source,
                {
                    Label: Source.Label,
                    Path: Source.Path,
                    TermGuid: Source.TermGuid,
                    Value: Source.Value,
                    WssId: Source.WssId
                }
            )
        }
    )
)
ALP1
Continued Contributor
Continued Contributor

Thanks...it works great. Thank you so much. I was focused with table statement. 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

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