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

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
Super User
Super User

Hi @Anonymous 

 

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 ?

Anonymous
Not applicable

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

StalinPonnusamy
Super User
Super User

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
Super User
Super User

Hi @Anonymous 

 

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
                }
            )
        }
    )
)
Anonymous
Not applicable

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

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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