cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dyee4613
Helper V
Helper V

Two Quick Questions: Dynamic Labels and Duplicate Prevention

Hi.  Here is what I'm trying to do.  

 

Dynamic Labels:

InputBox = 27

Label3 = COUNTA(Table1.Name)= 17

Label4 = "There are" Label3.value "Out of " Textinput3.text


I have the inputbox and label3 built.  How do I add their values to label 4?  

 

Duplicate Prevention

 

I'm making a signup sheet and I want to make sure the same user ID doesn't get entered multiple times by accident.  I was thinking using a lookup and if it finds anything then the submit button disables.  Is there a better way to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

Try this:

 

InputBox = 27   (Presumable that this is what the user types and that you named this Textinput3)

Label3.Text = COUNTA(Table1.Name (assuming you were stating the result from CountA was = 17)

Label4.Text = "There are " & Label3.Text & " Out of " & Textinput3.text

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

5 REPLIES 5
RandyHayes
Super User
Super User

Try this:

 

InputBox = 27   (Presumable that this is what the user types and that you named this Textinput3)

Label3.Text = COUNTA(Table1.Name (assuming you were stating the result from CountA was = 17)

Label4.Text = "There are " & Label3.Text & " Out of " & Textinput3.text

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
PaulD1
Super User
Super User

You can try preventing duplicated user IDs in the datasource - if you are using SharePoint, go into the settings for that Column and set 'Enforce unique values' to true.

If using SQL you can set a Unique Constraint on the column.

Oh duh, I forgot the &'s.  Thank you!

As of right now, it's just an excel sheet.

Sorry I didn't even see the second part of your original post.

 

So, on your thinking, yes - that is pretty much a good way to do it.

I was thinking something like this on the DisplayMode property:

   If(Lookup(YourTable, YourUserIDColumn=WhatEverControlHasTheNewIDinIt.Text, true), DisplayMode.Edit, DisplayMode.Disabled)

 

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,331)