Home > CRM > [Quick Tip] Canvas App | Generate test data using Sequence function

[Quick Tip] Canvas App | Generate test data using Sequence function

In my previous article, I explained the Sequence function. In this article, let’s see how to generate test data and bind it to a gallery control in no time.

Steps to prepare test data:

  • Create a simple canvas app with a Button, Textinput (i.e.,txtDataCount) and Gallery controls.
  • On ‘OnSelect’ event of button, place following formula:
    • This formula generates the customer objects using the Sequence function and adds them to collTestCustomers collection.
    • No of customers depends on the value provided in ‘txtDataCount‘ TextInput field.
ClearCollect(

collTestCustomers,
ForAll(
Sequence(txtDataCount.Text),
{
customerName: "Customer " & Value,
customerCity: "City " & Value
}
)
);
  • Set the gallery ‘Items’ as collTestCustomers.
  • That’s it!. Run the App.

🙂

Categories: CRM
  1. No comments yet.
  1. No trackbacks yet.

Leave a comment