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
Super User

@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
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,299)