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 / Sharepoint dropdown di...
Power Apps
Answered

Sharepoint dropdown distinct 2 column

(0) ShareShare
ReportReport
Posted on by 44

I am using powerapps to customize a sharepoint list.  (I thought I posted this earlier but now can't find it)

I want to make sure the user can't choose a fruit that they already have.  Is this something powerapps can do?

list:

userfruit (dropdown)
Johnapple
Maryapple
Mary peach

 

Thanks in advance for any assistance.

~Toni

Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at

    Hi @tonic212 ,
    Assuming the User is the User's Full Name (and User is not a good name for a column as it is a Reserved Word in Power Apps -  I will call it UserName ). You would set the user name Variable at App OnStart

    Set(varUser,User())

    Then you could have on the OnChange of the drop-down

    If(
     CountRows(
     LookUp(
     YourListName,
     UserName=varUser.Name &&
     Fruit=Self.Selected.Value
     )
     )>0,
     Notify(
     "You already have this fruit",
     NotificationType.Error
     );
     Reset(Self)
    )
    

     NOTE .Value may be different depending on the Items of the drop-down.

     

    Please click Accept as solution 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 giving it Thumbs Up.

  • tonic212 Profile Picture
    44 on at

    thank you Warren!  Is there a way to remove existing values from the dropdown so they can't even pick it?

  • WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at

    @tonic212 ,

    It will be complex if actually possible (which is why I went the way below) - what are the Items of the drop-down?

  • tonic212 Profile Picture
    44 on at

    the items are software.  the user is the Created By field.  I'm getting an error and tried various changes but still doesn't work.  The Created by field internally is called Author so I tried that but still error.  Appreciate any help. 

     

    Thank you

  • WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at

    @tonic212 ,

    I need the actual Items code (in Text please)

  • tonic212 Profile Picture
    44 on at

    the items are a dropdown lookup from a table called "Software". 

    Some of the items are:

    Photoshop

    Excel

    Word

    Do you need more info?

     

  • WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at

    @tonic212 ,

    Yes - the actual Items code (in text)

  • tonic212 Profile Picture
    44 on at

    this is sharepoint so there is no code.  The Software field is a lookup to a table called Software.

     

    Table: Software

    field: software

     

    table: Inventory

    field: software (lookup to table software above)

  • WarrenBelz Profile Picture
    155,779 Most Valuable Professional on at

    @tonic212 ,

    I will try again - go to the Items property of the drop-down and copy the code in there please.

    WarrenBelz_0-1617148647852.png

     

  • tonic212 Profile Picture
    44 on at

    Choices([@Inventory].Software)

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 477

#2
WarrenBelz Profile Picture

WarrenBelz 341 Most Valuable Professional

#3
11manish Profile Picture

11manish 317

Last 30 days Overall leaderboard