cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Iantaylor2050
Helper IV
Helper IV

Create metadata tags through powerapps newform - SharePoint

Hi All,

 

I have a Powerapps newform which is used to create a new record in SharePoint. In my newform, I have a tag field, which is used to store metadata tags in SharePoint. Metadata taxonomy column appear as a combo box in Powerapps form as in screenshot below.

 

tagg.PNG

I would like to have users key-in their own tags in Tag field and that tag should get saved into metadata field in SharePoint, once they submit the powerapp newform.

 

Please let me know if it can be done via powerapps. Any advice would be helpful. Thanks.

 

3 REPLIES 3
v-jefferni
Community Support
Community Support

Hi @Iantaylor2050 ,

 

Could you please share more details about your scenario?

 

Would you like to let users could manually type in the tags in the combo box then save it to SP list?

 

As per you mentioned that the Metadata taxonomy column appear as a combo box in Powerapps form, then it should be a LookUp column, if so, you will need to modify the OnSelect property of the submit button to:

SubmitForm(NewForm);
If(
   !IsBlank(DataCardValue.Selected),
   DataCardValue.Selected,
   Patch(LookUpList,
         Defaults(LookUpList),
         {Title:DataCardValue.SearchText}    // All requied columns need to set the value here
   )
)

 

Otherwise, the Update of that data card should be cleared to blank.

 

Notice: This solution would only be used when that is a New Form. If you are working with EdidForm in NewMode, this would occur errors in updating the tag value.

 

Hope this helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @v-jefferni 

 

Thanks for your response.

 

Yes, you are correct. I would you like to let users manually type in the tags in the combobox then save it to termstore field in SP list.

 

The approach you mentioned is to create a lookup column. When I add record via lookup column, it doesn't save into the termstore right ?

 

Is there a way where we can directly save combobox added term into the termstore field in SharePoint ?

 

Hi @Iantaylor2050 ,

 

The formula I provided was to save search text in Combo box's search area to SP list as the Title column value if there is no item selected in the combo box. This is the only way to add a new item within combo box since there is no more place of a combo box to type in.

 

About your first question, if it is a LookUp column means it retrieves records from another list so you will have to add records to the list being looked up then the LookUp column could find the new items. 

 

If you really want to make users type in new items clearly and save them to SP list when there is no item could and has been selected, you could add a TextInput box in the data card upside or beside the default combo box and turn off the search feature of the combo box, then make typed in text of the TextInput box as the search text or the source of new item instead. 

 

I made a mistake in above formula that submitted the form without setting the LookUp column value, but with the help of the method of adding a TextInput, you could add another button such as a plus icon if needed to add a new item to the lookup list, with the formula below:

If(IsBlank(LookUp(LookUpList,Title=TextInput.Text)),
Patch(LookUpList,
      Defaults(LookUpList),
      {Title:TextInput.Text}    // All requied columns need to set the value here
),
Notify("The tag has already exists, please select in the dropdown!",NotificationType.Warning)
//To warn and avoid duplicate items
)

The the Update of the LookUp column Data Card should be:

If(!IsBlank(DataCardValue.Selected),
   DataCardValue.Selected,
   LookUp(LookUplist,Title=TextInput.Text)
)

Then the submit button only need to be SubmitForm(NewForm)

 

Since within one button we could not trigger two submit action point to one SP list, the add button of the new tag is required so that users could first add a tag to LookUp list then when submitting the form the lookup column have a value to look up from.

 

Hope I have explained clearly and helps.

 

Best regards,

Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,525)