cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
k_cain
Helper II
Helper II

SharePoint Choice Column Not Recognized

Hello,

I have a SharePoint list called A-MAP that is connected to my app. There is a Choice column in my SharePoint list that details the name of an assigned Construction Analyst (SP list column name is Const_x0020_Analyst). The SP list also has a column called FHA_x0020_Number that is linked to a corresponding Construction Analyst. Basically, when a user selects an FHA Number from FHA Number_Dropdown in the app, I need the Construction Analyst (Construction Analyst_Input) field to autopopulate with that person's name. Because the SP list column is a Choice field, Powerapps is only showing [Record]. Is there any way around this?

k_cain_0-1611024160802.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi@k_cain,

Based on the issue that you mentioned, do you want to populate the TexInput based on the Dropdown selected?

Could you please share a bit more about the Const_x0020_Analyst, is it a Person type or a simple Choice type?

If it is a Person type, please try as follow:

Set the Default property of the TextInput1 as below:

LookUp('A-MAP',FHA_x0020_Number=FHA_x0020_Number_Dropdown.Selected.FHA_x0020_Number,Const_x0020_Analyst.DisplayName)

In addition, if you want to patch data to SP list, remember to convert as below:

Patch(
    'A-MAP',
    Defaults('A-MAP'),
    {
        FHA_x0020_Number: FHA_x0020_Number_Dropdown.Selected.FHA_x0020_Number,
        Const_x0020_Analyst: {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            DisplayName: TextInput1.Text,
            Claims: "i:0#.f|membership|" & First(Office365Users.SearchUser({searchTerm: TextInput1.Text})).Mail,
            Department: "",
            Email: First(Office365Users.SearchUser({searchTerm: TextInput1.Text})).Mail,
            JobTitle: "",
            Picture: ""
        }
    }
)

If it is a simple Choice type, please try as follow:

Set the Default property of the TextInput1 as below:

LookUp('A-MAP',FHA_x0020_Number=FHA_x0020_Number_Dropdown.Selected.FHA_x0020_Number,Const_x0020_Analyst.Value)

In addition, if you want to patch data to SP list, remember to convert as below:

Patch(
    'A-MAP',
    Defaults('A-MAP'),
    {
        FHA_x0020_Number: FHA_x0020_Number_Dropdown.Selected.FHA_x0020_Number,
        Const_x0020_Analyst: {Value: TextInput1.Text}
    }
)

Please attention the difference and try the correct one that fit your needs.

Note: If you want to save data back to SP list, please make sure that you have added the Office365Users connector to your App.

Hope it could help.

Regards,

Qi

View solution in original post

4 REPLIES 4
eka24
Super User III
Super User III

@k_cain 

What code is on the items property of the Dropdown?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

The current code for that dropdown is SortByColumns('A-MAP',"FHA_x0020_Number")

eka24
Super User III
Super User III

Try any of these in the default of the Textbox

LookUp('A-MAP',FHA_x0020_Number =

Number_Dropdown.Selected.Value, Const_x0020_Analyst)

Or

LookUp('A-MAP',FHA_x0020_Number =

Number_Dropdown.Selected.FHA_x0020_Number, Const_x0020_Analyst)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

v-qiaqi-msft
Community Support
Community Support

Hi@k_cain,

Based on the issue that you mentioned, do you want to populate the TexInput based on the Dropdown selected?

Could you please share a bit more about the Const_x0020_Analyst, is it a Person type or a simple Choice type?

If it is a Person type, please try as follow:

Set the Default property of the TextInput1 as below:

LookUp('A-MAP',FHA_x0020_Number=FHA_x0020_Number_Dropdown.Selected.FHA_x0020_Number,Const_x0020_Analyst.DisplayName)

In addition, if you want to patch data to SP list, remember to convert as below:

Patch(
    'A-MAP',
    Defaults('A-MAP'),
    {
        FHA_x0020_Number: FHA_x0020_Number_Dropdown.Selected.FHA_x0020_Number,
        Const_x0020_Analyst: {
            '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            DisplayName: TextInput1.Text,
            Claims: "i:0#.f|membership|" & First(Office365Users.SearchUser({searchTerm: TextInput1.Text})).Mail,
            Department: "",
            Email: First(Office365Users.SearchUser({searchTerm: TextInput1.Text})).Mail,
            JobTitle: "",
            Picture: ""
        }
    }
)

If it is a simple Choice type, please try as follow:

Set the Default property of the TextInput1 as below:

LookUp('A-MAP',FHA_x0020_Number=FHA_x0020_Number_Dropdown.Selected.FHA_x0020_Number,Const_x0020_Analyst.Value)

In addition, if you want to patch data to SP list, remember to convert as below:

Patch(
    'A-MAP',
    Defaults('A-MAP'),
    {
        FHA_x0020_Number: FHA_x0020_Number_Dropdown.Selected.FHA_x0020_Number,
        Const_x0020_Analyst: {Value: TextInput1.Text}
    }
)

Please attention the difference and try the correct one that fit your needs.

Note: If you want to save data back to SP list, please make sure that you have added the Office365Users connector to your App.

Hope it could help.

Regards,

Qi

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

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (24,194)