Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Manage Dropdown List Content

(1) ShareShare
ReportReport
Posted on by 4,465
I have a Canvas app with a screen that allows for the taking of pictures through the device camera.

I am using a Dropdown to control the naming of each picture from a list of predetermined names.

I picture name (from the Dropdown) should only be associated with one picture. The user should NOT
be able to take two pictures with the same name.

Is it possible to remove the name of the picture from the Dropdown list once the picture is taken (appears
in the Gallery or Collection), to eliminate the possibility of the user forgetting to or intentionally not changing
the name of the next picture?
 
Dropdown Items Property Content -
If(AJP_Invoice_Type_Fld.Text = "Storm Work", ["Storm Work - 1","Storm Work - 2","Strom Work - 3","Storm Work - 4","Storm Work - 5","Storm Work - 6","Storm Work - 7","Strom Work - 8","Storm Work - 9","Storm Work - 10"],
 
If(AJP_Invoice_Type_Fld.Text = "Drop" && AJP_Invoice_Type_Fld.Text <> "Trip",
["Aerial Pic","Conduit","Light Level at NID","Light Level at Tap","Map Route","NID","NID Tic Mark","PDF Staking Sheet","Riser Guard","Transition Tick Mark","Tap","Tap Tic Mark","Underground Run","Other - Attachment"],
 
AJP_Invoice_Type_Fld.Text = "Install" && AJP_Invoice_Type_Fld.Text <> "Trip",
["Ethernet Speed Test","Light Meter Back of ONT","NID","Outside Entry Hole","Router w/Green Lights","Running ONT","Wall Plate","Wifi Speed Test","Other - Attachment"]))
  • Verified answer
    timl Profile Picture
    timl 33,168 on at
    Manage Dropdown List Content
    Hi Phineas
     
    Rather than call RemoveIf, another option would be to filter the items in the dropdown using something like this. This assumes the images are stored in a collection called colImages and the image name in a column called Description.
     
    Filter(col_Drop_Job_Picture_Title_Collection,
            Not(
                Image_Name in colImages.Description
            )
    )
     
  • Phineas Profile Picture
    Phineas 4,465 on at
    Manage Dropdown List Content
    Okay, I figure out the correct 'OnStart' collection formula formatting.
     
    Collect(col_Drop_Job_Picture_Title_Collection,
        {Image_Name: "Aerial Pic"}, {Image_Name: "Conduit"}, {Image_Name:"Light Level at NID"}, {Image_Name:"Light Level at Tap"}, {Image_Name:"Map Route"},{Image_Name:"NID"},{Image_Name:"NID Tic Mark"},{Image_Name:"PDF Staking Sheet"},{Image_Name:"Riser Guard"},{Image_Name:"Transition Tick Mark"},{Image_Name:"Tap"},{Image_Name:"Tap Tic Mark"},{Image_Name:"Underground Run"},{Image_Name:"Other - Attachment"});


    Where do I place the 'RemoveIf()' so that once the user chooses an image description, takes the picture and the picture is in the Gallery/Collection that image description is removed for the choice in the Dropdown list?
  • Phineas Profile Picture
    Phineas 4,465 on at
    Manage Dropdown List Content
    The collection I made in 'OnStart'-

    Collect(col_Strom_Work_Job_Picture_Title_Collection,
    {Image_Name:["Storm Work - 1","Storm Work - 2","Strom Work - 3","Storm Work - 4","Storm Work - 5","Storm Work - 6","Storm Work - 7","Strom Work - 8","Storm Work - 9","Storm Work - 10"]});

    The formula I tried in the Dropdown -
     
    If(AJP_Invoice_Type_Fld.Text = "Storm Work",col_Strom_Work_Job_Picture_Title_Collection.Image_Name)

    The collection has a table in it that has all of the items in it, but I am getting an error in the Dropdown that reads -

       "Warning: The columns produced buy this rule are all nested tables and/or records, however the property expects
         at least some columns of simple values (such as text, or numbers)."
  • Verified answer
    Pstork1 Profile Picture
    Pstork1 64,523 on at
    Manage Dropdown List Content
    If you did the dropdown based on a collection or table you could do a RemoveIf() when they use the name.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

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

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,940

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,523

Leaderboard