web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to create conditio...
Power Apps
Unanswered

How to create conditional lookup column by Powerapps

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi

There is a list A that has column Study and Status on share point.

And there is an other list B that also has Study column that is a lookup column and refer to Study of list A.

Now we would like to realize that Study column in list B just refer to the Study column with open status of list A.

I think that could be realized by Powerapps.

It will be appreciate if someone could give me the tips.

If Collection is needed, how to write the formula?

 

 

 

Categories:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to listB Study column linked to all the columns that are open status of list A?

    Could you tell me the data type of status column in listA?

    I assume that 

    1)you want to link listB study column to all the columns that are open status of list A.

    2)the data type of status column in listA is single choice.

    Then please try this formula:

    Patch(listB,Defaults(listB),{study:Filter(Choices(listB.study),status.Value="open")})

    If you just want to filter items that status is open when choosing value of lisB study, you could set the combo box's Items:

    Filter(listB,status.Value="open")

    The patch formula is:

    Patch(listB,Defaults(listB),{study:combo box1.SelectedItems)})

    Here's a blog about how to update complex data type of sharepoint list for your reference:

    https://powerapps.microsoft.com/en-us/blog/default-values-for-complex-sharepoint-types/

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you for your reponse.

    I want to link list B Study column to list A Study column that Status is open.

    List A ,Study column is text, and Status is a choice column( Open, Closed).

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @v-yutliu-msft 

     

    The requirement is that the users use the share point, when they select the List B Study, only Open status Study is showed.

    List B Study column is a lookup column, that refer to List A Study column.

    List A Study column is a Text column.

    List A Status column is a  Choices column.

  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Do you want to make this in sharepoint list, not PowerApps app?

    If so, I suggest you create a sharepoint custom form.

    I've made a similar test for your reference:

    1)Open listB, choose "customize with PowerApps"919.PNG

    2)Connect with listA

    3)Unlock study column

    4)lookup column is a combo box dy default

    Set the combo box's Items:

    Filter(listA,status.Value="open")

    Change the combo box's Fields:9191.PNG

    Set this datacard's Update:

    {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
     Id:DataCardValue4.Selected.ID,
     Value:DataCardValue4.Selected.Title}
     

    Please replace DataCardValue4 with your combo box's name.

    5)save the app, publish the app

     

    Then in sharepoint list, you could only choose the items that status is open.

     

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hi@v-yutliu-msft 

    Thank you.

    Could you please kindly tell why below setting has the error that "Invalid argument type"?

    And I also tried to change the combo box's Fields, but that coud not be edited.

     

    Set the combo box's Items:

    Filter(listA,status.Value="open")

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous 

     

    If you want to lookup in a column just simply use this sysntax.

    LookUp(SOURCE,ColumnName = "Open").ColumnName

     

    or kindly send a screenshot the flow you want to apply in powerapps with sharepoint. 

     

    Best Regards,

    Boynogs123

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard