cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dudu24100
Frequent Visitor

dynamic duplicate value

Hi all,

 

I try to create an App with PowerApps, that duplicate value (Date and Agent's Name) in a sharepoint list once i submit as below :

That is how it should appear in the sharepoint list :

Capture.PNG

That is how the app looks like :

Capture 2.PNG

 

Thank you in advance for your assistance.

Kevin

 

 

 
 
2 REPLIES 2
mdevaney
Super User III
Super User III

@Dudu24100 
Try this...

 

// create a table of all the values
ClearCollect(
    myCollection(
    {'Agents Name': TextInput_AgentName.Text, Date: TextInput_Date.Text, 'QE Type': "QE0", 'QE Amount': TextInput_QE0.Text},
    {'Agents Name': TextInput_AgentName.Text, Date: TextInput_Date.Text, 'QE Type': "QE1", QE Amount: TextInput_QE1.Text},
    {'Agents Name': TextInput_AgentName.Text, Date: TextInput_Date.Text, 'QE Type': "QE2", QE Amount: TextInput_QE2.Text},
    {'Agents Name': TextInput_AgentName.Text, Date: TextInput_Date.Text, 'QE Type': "QE3", QE Amount: TextInput_QE3.Text},
    {'Agents Name': TextInput_AgentName.Text, Date: TextInput_Date.Text, 'QE Type': "QE4", QE Amount: TextInput_QE4.Text}
);

// remove any rows where QE was not entered
RemoveIf(myCollection, QE: Blank());

// insert new rows into the SP list
Collect(your_datasource_name, myCollection);

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Thank you 🙂

The code is working but as below it gives me an error : "Name is not valid" at MyCollection.

 

Capture3.PNG

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,287)