cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jinfanti
Frequent Visitor

Add a new value to SharePoint Choice Column with Power Apps (+ Edit and Delete)

Hello ! 😊

 

This is my first time posting here, thank you in advance for your help. 

I am stuck on the same "problem" for a few days and despite several searches, I can't find a solution.

 

I need to create a project time entry application for my company. There is a Share Point list but the users must use only a Power Apps application linked to this list.
At the request of the managers of my company, I am creating an administrator view where they will be able to add, modify and delete column choices.

 

I would like to know if it is possible to add a personalized choice in a Share Point column with Power Apps?
Is it also possible to modify and delete a choice in a column with Power Apps?
The changes should also appear on Share Point.

 

Thanks a lot, have a nice day! 😁

 

 

For example :

I have 5 projects in my column (Project 1, Project 2, Project 3, Project 4, Project 5), I want to manually add "Project 6" without going to Share Point but only using Power Apps. I would like this "Project 6" to remain in Power Apps and in Share Point so that I can use it later.

 

Sans titre.png

(in power apps) 

jinfanti_0-1669633023209.png-jinfanti_5-1669632010142.png

 

As it is in French, I put you an example of a share point column in English that I found (it is the equivalent).

 

Screen Shot 2022-05-03 at 12.25.09 PM.png

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello ! 😊

I finally changed my method and found a more viable solution... 
Thanks for your answers!

Have a nice day 😁

View solution in original post

10 REPLIES 10
g1224
Resolver V
Resolver V

Hi @jinfanti 

If you want to stick to default SharePoint Choice column , you can use Send HTTP request in flow  to achieve this . 

 

This video might help you .  - https://www.youtube.com/watch?v=woG8njjyScM 

 

Also if the values are going to grow , do replace the choice with Look Up type and then you can directly update the choices via PowerApps itself . Choice is yours !

WarrenBelz
Super User
Super User

Hi @jinfanti ,

You might have a read of this blog of mine as this is how I handle Choice datasets. It would be possible to interact with this list from Power Apps, but I have not bothered.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Sundeep_Malik
Community Champion
Community Champion

Hey @jinfanti 

 

If your field is inside a form, then you can just write the following formula in Update Property:

 

If(
    !IsBlank(DataCardValue1.Selected),
    DataCardValue1.Selected,
    If(
        !IsBlank(DataCardValue1.SearchText),
        {
            Value: DataCardValue1.SearchText,
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"
        },
        Blank()
    )
)

 And just change the data card values on your own. 

Hi @Sundeep_Malik ! 😊

 

Thank you for your answer.

 

To display the values of the choice column I use "List Box" that I inserted in a gallery because I have several "List Box" to manage (Projects, Lots, Activities). How can I make a form work with "List Box"?

 

jinfanti_0-1669640103277.png

 

I tried this method, the new value appears but it overwrites the old value (I can't add Project 6 and Project 7 for example). When I do this method, my already recorded rows are overwritten by the new value too.

 

on power apps :

 jinfanti_1-1669640249406.png-jinfanti_2-1669640261661.png

on share point :

Sans titre.png

 

Do you have a solution for this?

 

Thanks a lot, have a great day! 😁

Hi @WarrenBelz ! 😊

 

Thank you for your answer.

I have seen this article before and the method used looks simple to understand and effective.

I tried this method, I have errors from the first step: "At App OnStart, I create a Global Record Variable gblChoices [...]"
I take the code and replace your values with mine.
For example in your code Animals = Project (for me).
Error: "The "Sort" function contains invalid arguments."
Is this because the type is Choice?

 

If the problem is with With(), is there any other way? If so, can you give me an example please?

 

Thanks a lot, have a great day! 😁

Hi @g1224  ! 😊

 

Thank you for your answer.

 

I have already seen this video but it does not fully answer my problem...

 

If I can also suggest a video if ever someone with the same problem as me comes on this topic: https://www.youtube.com/watch?v=TH6oqsfxPaE

 

Thanks a lot, have a great day! 😁

Hi @jinfanti ,

Can you please post your code (in Text) that you are getting errors on.

Hello ! 😊

I finally changed my method and found a more viable solution... 
Thanks for your answers!

Have a nice day 😁

Hi, which is the method you used in the end? I ended up with the same problem

the video you linked from shane?

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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,910)