Skip to content

Commit 23cd88e

Browse files
committed
addition to sequence
1 parent 7315252 commit 23cd88e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

powerapps-docs/maker/canvas-apps/functions/function-sequence.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,17 @@ Generate a table of sequential numbers.
2020
## Description
2121
The **Sequence** function generates a single column table of sequential numbers, such as 1, 2, 3. The name of the column is **Value**. `Sequence( 4 )` is equivalent to `[1,2,3,4]`.
2222

23-
Use **Sequence** with the **ForAll** function to iterate based on a count.
23+
Use **Sequence** with the **ForAll** function to iterate a specific number of times. For example, the following formula adds 10 random numbers to the collection **MyRandomNumbers**:
24+
25+
```powerapps-dot
26+
ForAll( Sequence( 10 ), Collect( MyRandomNumbers, Rand() ) )
27+
```
28+
29+
**ForAll** can also be used to transform the value into other data types and return a new table. For example, the following formula returns a table of the next 10 days:
30+
31+
```powerapps-dot
32+
ForAll( Sequence( 10 ), DateAdd( Today(), Value, Days ) )
33+
```
2434

2535
The number of records to generate is rounded down to the nearest whole number and must be in the range 0 to 50,000. Generating a table with 0 records results in an *empty* table.
2636

0 commit comments

Comments
 (0)