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 Apps
Suggested Answer

DropDown Items

(1) ShareShare
ReportReport
Posted on by 26
hey, 
 
I'm trying to do the items tab on my drop down with:

if my colselected (it's always just one item = 1 row) on the status column = "CD",
then the drop down only shows me options for ["CD"] (i also need a blank option).

if not, if the status = "Result", then look up on the list "TestResult", for that same code on the column MaterialDoc on the colselected and read off of the ddTestResult column within the list.

if the column = Pass, then my drop down only shows me options for ["321"] (i also need a blank). If "Fail", it shows me the same as before, ["CD"].
 
I was trying something like:
If(
    !IsBlank(LookUp(colSelected, Status = "CD")),
    [" ", "CD"],
    LookUp(
        TestResult,
        MaterialDoc = ThisRecord.MaterialDoc,
        ddTestResult
    ) = "PASS",
    [" ","321"],
    [" ","CD"]
)

it was giving me different errors. any idea what can be done?
Categories:
I have the same question (0)
  • Suggested answer
    Kalathiya Profile Picture
    2,456 Super User 2026 Season 1 on at
    Hello @VO-16022037-0
     
    Assuming that you are using the form control inside have dropdown/combobox control. 
     
    Please try below code: 
    With(
        {
            resultStatus: LookUp(
                TestResult,
                MaterialDoc = selectedRecord.MaterialDoc, 
                ddTestResult
            )
        },
        If(
            selectedRecord.Status = "CD",
            ["", "CD"],
            If(
                resultStatus = "PASS",
                ["", "321"],
                ["", "CD"]
            )
        )
    )
    
    Note: // selectedRecord - Replace this with your selected record. Use a variable if you're storing the selection, or reference the relevant control (e.g., Dropdown1.Selected) if the value depends on another dropdown
     
    If this response resolves your issue, please mark it as the Verified Answer so it can help other community members as well.
    ---------------------------------------------------------------------------------

    📩 Need more help? Just mention @Kalathiya and I’ll be happy to assist.

    ✔️ If this answer helped you, please tick “Does this answer your question?” so it can be marked as the Verified Answer.

    💛 A Like always motivates me to keep contributing!

     
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    Try below :
     
    With(
    {
    varStatus: First(colSelected).Status,
    varMaterialDoc: First(colSelected).MaterialDoc,
    varResult: LookUp(
    TestResult,
    MaterialDoc = First(colSelected).MaterialDoc,
    ddTestResult
    )
    },
    If(
    varStatus = "CD",
    ["", "CD"],
    varStatus = "Result" && varResult = "PASS",
    ["", "321"],
    ["", "CD"]
    )
    )
  • WarrenBelz Profile Picture
    155,840 Most Valuable Professional on at
    Posting in case any of the previous results do not work with a couple of suggestions.
     
    Firstly, you only need one of two results, so why bother with any test on "CD". Also the Combo Boxes (and other Table controls) can be inconsistent when given dynamic multiple Items options, so this should work if your problems are here
    With(
       {
          _Item:
          If(
             LookUp(
                TestResult,
                MaterialDoc = ThisItem.MaterialDoc,
                ddTestResult
             ) = "PASS",
             "321",
             "CD"
          )
       },
       Table(
          {Value: " "},
          {Value: _Item}
       )
    )
     
    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  
  • Suggested answer
    Haque Profile Picture
    3,653 on at
    Hi @VO-16022037-0,
     
    Just adding bit of optimized one (with )  avoiding Table: 
    ClearCollect(
        colValues,
        {Value: " "},
        {Value: If(LookUp(TestResult, MaterialDoc = ThisItem.MaterialDoc, ddTestResult) = "PASS", "321", "CD")}
    )
    
    This avoids Table() inside With and creates a collection directly.
     
    Also, if you want a single string with empty space and the conditional value concatenated, you can do:
    " " & ", " & If(LookUp(TestResult, MaterialDoc = ThisItem.MaterialDoc, ddTestResult) = "PASS", "321", "CD")
    
     

    I am sure some clues I tried to give. If these clues help to resolve the issue brought you by here, please don't forget to check the box Does this answer your question? At the same time, I am pretty sure you have liked the response!
  • WarrenBelz Profile Picture
    155,840 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.
     
    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