cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

Two Columns Unique when joined together within SharePoint

Hi All,

 

I am new to PowerApps development so I apologise if may request for help is obvious.

 

I have a SharePoint list where a project id is made up of two SharePoint columns.

Column01       Column02             Project_ID

Red                  UK                          Red-UK

Blue                 USA                        Blue-USA

Green              Australia                 Green-Australia

Red                 Canada                   Red-Canada

Yellow             USA                        Yellow-USA

 

My PowerApps has the two columns Column01 and Column02.

 

My question is how do I setup my PowerApps so when a user types in the two PowerApps text boxs for columns01 and column02 a check is done to make sure the text is unique when the two columns are joined together to create the Project ID within the SharePoint list?

 

Because I am new to PowerApps can you please go into detail or use screenshots.

 

I hope you can help.

Colin

2 REPLIES 2
Advocate II
Advocate II

I would suggest doing a Lookup on ProjectID to see if it already exists.  If no rows are returned then it's unique and can be added

Community Support
Community Support

Hi@ColinStar,

Based on the issue that you mentioned, do you want to check if there is an existing combination?

Could you please share a bit more about the scenario?

I have a similar test on my side, please take a try as below.

2021-02-23-01.png

Set the Default property of the TextInput corresponding to the Project-ID as below:

If(
    Concatenate(
        DataCardValue6.Text,
        "-",
        DataCardValue7.Text
    ) in Concat(
        Combined.Project_ID,
        Project_ID,
        "-"
    ),
    "You Have Duplicate Combination!",
    Concatenate(
        DataCardValue6.Text,
        "-",
        DataCardValue7.Text
    )
)

Note: DataCardValue6 and DataCardValue7 represent the TextInput corresponding to the Column01 and Column02.

Hope it could help you.

Regards,

Qi

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (60,136)