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

Generate fake data for testing app

 Hello I would like if this is possible to generate 2000  data line in Microsoft Lists for testing my app and see if it's still work well. it is possible ? I've searched and I just see some tuto for excel.

13 REPLIES 13
WarrenBelz
Super User
Super User

Hi @Dive1 ,

This will take a while to run and you can put whatever you want in the fields, but I have used the sequence number as an example in a Text and numeric field

Patch(
   YourSPList,
   ForAll(
      Sequence(2000),
      {
         TestNo: Value * 4,
         Data: "Test" & Text(Value)
      }
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

How do this work with for exemple I have choice in my data

like a table "Sector" with in it Sector1; Sector2 and Sector3 ?

@Dive1 ,

You would enter

Sector: {Value: "YourValueHere"}

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

is that something like that I don't understand how I should write it

Patch(
   OpportunitesVTest2000;
   ForAll(
      Sequence(2000);
      {
         Secteur.Value: "Lamballe";
         "Date Création".Value:today();
         Com.Value: CurrentUser.FullName;
         Etat.Value: "En Cours";
         Société: "Soc1";
         "Nom client": "ClientTest";
         "Ville client": "VilleTest";
         Type_Mat: "RG500";
         Montant.Value: 500;

      }
   )
)

 

It says I have error  like that is not the operator that they await

@Dive1 ,

Please see corrected post - yours would be

Patch(
   OpportunitesVTest2000;
   ForAll(
      Sequence(2000);
      {
         Secteur: {Value: "Lamballe"};
         "Date Création": Today();
         Com: {Value:CurrentUser.FullName};
         Etat: {Value: "En Cours"};
         Société: "Soc1";
         "Nom client": "ClientTest";
         "Ville client": "VilleTest";
         Type_Mat: "RG500";
         Montant.Value: 500
      }
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

I think I've writed good but it seem it don't work it tell me "the type of argument is not valide(Table). Value Record await." "The fuction 'patch' contain wrong argument"

Patch(
   OpportunitesVTest2000;
   ForAll(
      Sequence(2000);
      {
         Secteur: {Value: "Lamballe"};
         'Date Création': Today();
         Com: {Value:User().FullName};
         Etat: {Value: "En Cours"};
         Société: "Soc1";
         'Nom client': "ClientTest";
         'Ville client': "VilleTest";
         Type_Mat: "RG500";
         Montant: {Value: "200"};
         '%Réussite': {Value: "80"};
         Commentaire: "test";
         'Date de relance': Today();
         'Marque reprise': {Value: "SANS REPRISE"};
      }
   )
)

 

Does I have to write all table in the function ? some of them I want them empty so I did't write in it. 

@Dive1 ,

Which item is this error on? I cannot see your data, so you can you please provide a screen shot of your SharePoint List settings with the field types of each of these.

Dive1
Helper II
Helper II

hello the errors in on all the formule everything is red.

I've joint the sharepoint lists with their type

(Une seule ligne de texte = Text

Date et Heure = Date and Hour

Personne ou groupe = Person or group

Nombre = Number

Choix = choice)

@Dive1 ,

From what you have posted, it would be something like this

Patch(
   OpportunitesVTest2000;
   ForAll(
      Sequence(2000);
      {
         Secteur: {Value: "Lamballe"};
         'Date Création': Today();
         Com: 
         {
            '@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedUser",
            Claims: "i:0#.f|membership|" & Lower(User().Email),
            Department: "",
            DisplayName: User().FullName,
            Email: Lower(User().Email),
            JobTitle: "",
            Picture: ""
         },
         Etat: {Value: "En Cours"};
         Société: "Soc1";
         'Nom client': "ClientTest";
         'Ville client': "VilleTest";
         Type_Mat: "RG500";
         Montant: 200;
         '%Réussite': {Value: "80"};
         Commentaire: "test";
         'Date de relance': Today();
         'Marque reprise': {Value: "SANS REPRISE"};
      }
   )
)

If there are any errors, please first read my blog on Controls and their outputs. Your original post was  Hello I would like if this is possible to generate 2000  data line in Microsoft Lists for testing my app and see if it's still work well. it is possible ?  - you need to understand your control references, so please try and investigate errors and note what you have found and done.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

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.

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.

Users online (3,072)