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 / Check multiselect look...
Power Apps
Suggested Answer

Check multiselect lookup column and set required field in Powerapps

(1) ShareShare
ReportReport
Posted on by 126
I have a multiselect lookup column in SharePoint which stores the value of all the required column for the Powerapp form. 
 
 
Based on the above configurations, sharepoint columns with internal name Finance and Legal are required as the IsRequired is set to true. 
 
In my datacard in Powerapps New Form, i am setting the required field based on these conditions, but it fails. May i know where i am going wrong?
 
Datacard Required Field
If(
    LookUp(
        'Data Source',
        'Title1'.Value = DataCardValue48.Selected.Value && 'Type1'.Value = DataCardValue6.Selected.Value&&'Required Field'.Value in "Finance",
        IsRequired
    ) = true,
    true,
    false
)
 
I have the same question (0)
  • Suggested answer
    Vish WR Profile Picture
    3,748 on at
     
    Can you try 
    If(
        LookUp(
            'Data Source',
            'Title1'.Value = DataCardValue48.Selected.Value &&
            'Type1'.Value = DataCardValue6.Selected.Value &&
            "Finance" in 'Required Field'.Value,
            IsRequired
        ),
        true,
        false
    )
  • Suggested answer
    WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    Firstly @Vish WR is close, but I will add a couple of things.
     
    Firstly, you need to add all criteria as filter conditions (although a comma may also work)
    LookUp(
       'Data Source',
       'Title1'.Value = DataCardValue48.Selected.Value && 
       'Type1'.Value = DataCardValue6.Selected.Value && 
       "Finance" in 'Required Field'.Value && 
       IsRequired
    )
    However you also have a Delegation issue here with the in parameter, so you can do this
    With(
       {
          _Data:
          Filter(
             'Data Source',
             'Title1'.Value = DataCardValue48.Selected.Value && 
             'Type1'.Value = DataCardValue6.Selected.Value && 
             IsRequired
          )
       },
       !IsBlank(
          LookUp(
             _Data,
             "Finance" in 'Required Field'.Value
          )
       )
    )
    Also you do not need to include If/true/false if you are returning a Boolean value - a true or false statement as above will return the matching value - I have a blog explaining this. Just use the code above in the Required property of the Data Card.
     
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • Poweruser32490 Profile Picture
    126 on at
    Hi @WarrenBelz,
     
    I used the below code in Required field property of the datacard, but it throws error saying Expected Boolean Value
     
    Please take a note that the lookup column "Required Field" is a multiselect column and IsRequired is a Yes/No field in SharePoint. 
     
    With(
       {
          _Data:
          Filter(
             'Data Source',
             'Title1'.Value = DataCardValue48.Selected.Value && 
             'Type1'.Value = DataCardValue6.Selected.Value && 
             IsRequired
          )
       },
       LookUp(
          _Data,
          "Finance" in 'Required Field'.Value
       )
    )
     
  • Vish WR Profile Picture
    3,748 on at
     
    With(
       {
          _Data:
          Filter(
             'Data Source',
             'Title1'.Value = DataCardValue48.Selected.Value && 
             'Type1'.Value = DataCardValue6.Selected.Value && 
             IsRequired
          )
       },
       !IsBlank(
          LookUp(
             _Data,
             "Finance" in 'Required Field'.Value
          )
       )
    )
     
     
    or 
     
    With(
       {
          _Data:
          Filter(
             'Data Source',
             'Title1'.Value = DataCardValue48.Selected.Value && 
             'Type1'.Value = DataCardValue6.Selected.Value && 
             IsRequired
          )
       },
       !IsBlank(
          LookUp(
             _Data,
             "Finance" in 'Required Field'.Value
          )
       )
    )
  • 11manish Profile Picture
    3,333 on at
    The error occurs because the multi-select lookup column returns a table, not a single value, and the LookUp function returns a record instead of a Boolean.
     
    To fix this, you must check for the existence of "Finance" using CountIf within the lookup column and wrap the result with !IsBlank to return a Boolean value.
     
    This ensures the Required property receives a valid true/false result.
     
    Try below :
     
    With(
        {
            _Data:
            Filter(
                'Data Source',
                'Title1'.Value = DataCardValue48.Selected.Value &&
                'Type1'.Value = DataCardValue6.Selected.Value &&
                IsRequired = true
            )
        },
        !IsBlank(
            LookUp(
                _Data,
                CountIf('Required Field', Value = "Finance") > 0
            )
        )
    )
     
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    Please see updated post - original left a line out - dangers of free-typing code without brain engaged properly.
  • Vish WR Profile Picture
    3,748 on at
     
     

    Just wanted to check in and see if everything is working now. If you still need any help, feel free to let me know.

     

    Vishnu WR
     
    Please âœ… Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like â™¥
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for. Happy to assist further if not - I beleive my post shoud be the solution you were after.
     
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like â™¥
    Visit my blog
    Practical Power Apps    LinkedIn   
     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard