cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
mae_be9292
Level: Powered On

I want to when I select A it will show B by using If function

I have a sharepoint database with 2 colume and it is a choice list

when i connect it to power app , it turn to dropdown list

 

and I use this code

 

If(DataCardValue10.Selected.Value = "Marketing",['sharepointdatabase'.Name],DataCardValue10.Selected.Value = "Finance",[ ‘sharepointdatabase '.Colour])

 

but it doesn't work - It doesn't connect data from sharepoint to this dropdown

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: I want to when I select A it will show B by using If function

Hi @mae_be9292 

 

What are your 2 choices' column name in your?

Could you please share more details of your data source?

Is Name and Color is the second one choice column's items?

 

I test with 2 choices' columns as next:

DataSource:

2019test(my sp list name)

Department(choices type)

Na&Color(choices type)

choicecolumns1.PNG

 

 

App:

DataCardValue18.Items=If(DataCardValue16.Selected.Value = "Marketing",Filter(Choices('2019test'.'Na&Color'),Value ="Name"),DataCardValue16.Selected.Value = "Finance",Filter(Choices('2019test'.'Na&Color'),Value ="Color"))

 

(the green color ones are the datacard name,sp list name, Choice column name on my side, you can change them on your side)

choicesColumn.PNG

if.gif

 

More information:

function-if

 

Hope this could be helpful.

 

Best Regards.

Yumia

1 REPLY 1
Community Support Team
Community Support Team

Re: I want to when I select A it will show B by using If function

Hi @mae_be9292 

 

What are your 2 choices' column name in your?

Could you please share more details of your data source?

Is Name and Color is the second one choice column's items?

 

I test with 2 choices' columns as next:

DataSource:

2019test(my sp list name)

Department(choices type)

Na&Color(choices type)

choicecolumns1.PNG

 

 

App:

DataCardValue18.Items=If(DataCardValue16.Selected.Value = "Marketing",Filter(Choices('2019test'.'Na&Color'),Value ="Name"),DataCardValue16.Selected.Value = "Finance",Filter(Choices('2019test'.'Na&Color'),Value ="Color"))

 

(the green color ones are the datacard name,sp list name, Choice column name on my side, you can change them on your side)

choicesColumn.PNG

if.gif

 

More information:

function-if

 

Hope this could be helpful.

 

Best Regards.

Yumia