cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
santukondapally
Helper II
Helper II

Allow Duplicates on one button and not in another button

In My Form i have a column value which is comming from another screen say for example(#MYTEXT123)

Now in the second screen form i have a column with type number name as (SSCNUMBER) and a 2 buttons (Add more,Save).


On Click of a button (add more ) i want user to enter(SSCNUMBER) Duplicate values in to the Sharepointlist for the column (#MYTEXT123) ,However if user clicks on 'save' button SSCNUMBER should not allow duplicate values in the list for (#YTEXT123).

Can we do it in powerapps like this??

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @santukondapally,

Could you please tell me that

  1. '#MYTEXT123', SSCNUMBER and #YTEXT123 are in the same SP list?('#YTEXT123' is a mistake writing?)
  2. do you want to copy the value in the SSCNUMBER to the '#MYTEXT123' if click the add more button?
  3. how you configure your form, used to edit the existing record or create a new record?

Based on the issue that you mentioned, do you want to patch different value based on the button?

Not sure about your scenario, I just assume that you use the form to edit the existing record and click add more button to copy the value to '#MYTEXT123' column,otherwise not duplicate.

Set the add more button OnSelect:

 

Patch(
     SPList,
     BrowseGallery1.Selected,// Here you could replace with the Item formula you set for the form
     {'#MYTEXT123':SSCNUMBERTextInput.Text}
)

 

Set the save button OnSelect:

 

Patch(
     SPList,
     BrowseGallery1.Selected,// Here you could replace with the Item formula you set for the form
     {'#MYTEXT123':#MYTEXT123TextInput.Text}
)​

 

Regards,

Qi

Best Regards,
Qi

View solution in original post

1 REPLY 1
v-qiaqi-msft
Community Support
Community Support

Hi @santukondapally,

Could you please tell me that

  1. '#MYTEXT123', SSCNUMBER and #YTEXT123 are in the same SP list?('#YTEXT123' is a mistake writing?)
  2. do you want to copy the value in the SSCNUMBER to the '#MYTEXT123' if click the add more button?
  3. how you configure your form, used to edit the existing record or create a new record?

Based on the issue that you mentioned, do you want to patch different value based on the button?

Not sure about your scenario, I just assume that you use the form to edit the existing record and click add more button to copy the value to '#MYTEXT123' column,otherwise not duplicate.

Set the add more button OnSelect:

 

Patch(
     SPList,
     BrowseGallery1.Selected,// Here you could replace with the Item formula you set for the form
     {'#MYTEXT123':SSCNUMBERTextInput.Text}
)

 

Set the save button OnSelect:

 

Patch(
     SPList,
     BrowseGallery1.Selected,// Here you could replace with the Item formula you set for the form
     {'#MYTEXT123':#MYTEXT123TextInput.Text}
)​

 

Regards,

Qi

Best Regards,
Qi

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

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

Users online (3,287)