cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tmitton
Regular Visitor

Need help changing data card value in SharePoint App from text to drop down

Hey everyone,

 

I have found multiple threads on this issue, but none of them seem to solve the problem I'm having. 

 

I started out by building out a SharePoint list with all the columns I need. One of my columns is "Department" and this is formatted as a single-line text column. Then I created my app directly from this SharePoint list. 

 

Now that it's built out, I want to change my "Department" column from a free text field to a drop-down. If I change my column in SP from single-line text to choice and then update my data source settings in my app, I get an error that I can't seem to resolve. If I leave my SP column as single-text and insert a drop down field into the Department data card, I can't figure out how to get the selected item from that drop down to feed into the "Department" column in my SharePoint list. 

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @tmitton ,

Do you want to change the "Department" field from original Text Box into a Dropdown box in your Edit form?

 

If you want to change the "Department" field from original Text Box into a Dropdown box in your Edit form, you could change the "Control Type" of the "Department" field data card to "Allowed values" option, then the original Text Box would be changed into a Dropdown box automatically. Please check the following GIF screenshot for more details:

Test.gif

Note: If you could not change the Control Type for the "Department" field data card, please remove the Department field data card from your Edit form, then enable this field data card again, then you could change the Control Type your Department field data card.

If you add a Dropdown box inside your Departments field data card in your Edit form, and you want to bind the selected Dropdown box value to the Department field, please set the Update property of the Department field data card to following:

Dropdown1.Selected.Value

set the Default property of the Dropdown box (Dropdown1) to following:

ThisItem.Department

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
JayMagness
Super User
Super User

Hi,

 

The way I do it is to create a second table in SharePoint and and make the department field pill in form the second table as a lookup and then all works well. If you want you can send an email jay@research-nest.com and I will get on teams with you and help you

 

Jay

So basically create a new column that is already formatted as "Choice" and hide the old column? That is how I "fixed" it originally but I felt that was more of a work around than a true fix. 

HI please send me an email and i can help you

KrishnaV
Super User III
Super User III

Hi @tmitton ,

 

Try the below steps:

  1. Close the Power Apps web editor
  2. Go to list and open the form in PowerApps again (using customize forms in PowerApps)
  3. Now select the data card you want to modify and delete it
  4. Now add the filed with (editFields option)

This worked for me.

See the below:
Delete Filed.gif


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.
BenFetters
Continued Contributor
Continued Contributor

Hi,

 

I do this quite often. I imagine that you've put a drop down into the data card already, the only thing left to do is to change the Update property of the department data card to the drop down. So, make sure you've selected the data card and not something inside of the data card (happens sometimes) go to the Update property and change it to something like: DropDownName.Selected.Value

 

the "Value" part of this might be something else depending on what your Items property of the drop down is. But, basically, the Update property of the data card is what is being fed into the column. So, if you were to type in exactly: "Text" into the update property, it would return "Text" to that field in the list. Let me know if that didn't make sense!

 

Also, if you haven't done this already, the Items property of your drop down control can "hard coded" to something like : ["HR","Accounting","Marketing"] if you're wanting it to be like that. Otherwise, you could connect to a separate list of department names as was mentioned by someone else on this feed.

 

I hope this all makes sense, if this doesn't work, let me know! 

 

Kind regards,

 

Ben Fetters

Sovereign SP

www.sovereignsp.com

If this solved the problem for you, feel free to hit "Accept as Solution" so others can find the answer easier. 🙂

Kind regards,

Ben Fetters
Power Apps/Power Automate Developer
www.sovereignsp.com
v-xida-msft
Community Support
Community Support

Hi @tmitton ,

Do you want to change the "Department" field from original Text Box into a Dropdown box in your Edit form?

 

If you want to change the "Department" field from original Text Box into a Dropdown box in your Edit form, you could change the "Control Type" of the "Department" field data card to "Allowed values" option, then the original Text Box would be changed into a Dropdown box automatically. Please check the following GIF screenshot for more details:

Test.gif

Note: If you could not change the Control Type for the "Department" field data card, please remove the Department field data card from your Edit form, then enable this field data card again, then you could change the Control Type your Department field data card.

If you add a Dropdown box inside your Departments field data card in your Edit form, and you want to bind the selected Dropdown box value to the Department field, please set the Update property of the Department field data card to following:

Dropdown1.Selected.Value

set the Default property of the Dropdown box (Dropdown1) to following:

ThisItem.Department

 

Please consider take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (82,326)