{"id":10914,"date":"2020-07-20T05:00:18","date_gmt":"2020-07-20T12:00:18","guid":{"rendered":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/power-apps\/formulas-thisrecord-as-and-sequence\/"},"modified":"2025-06-11T07:58:11","modified_gmt":"2025-06-11T14:58:11","slug":"formulas-thisrecord-as-and-sequence","status":"publish","type":"post","link":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/power-apps\/formulas-thisrecord-as-and-sequence\/","title":{"rendered":"Formulas: ThisRecord, As, and Sequence"},"content":{"rendered":"<p>Happy Monday!\u00a0 It&#8217;s a great day for <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-forall\"><strong>ForAll<\/strong><\/a>!<\/p>\n<p>You can now refer to the whole record in\u00a0<strong>ForAll<\/strong> and other record scope functions with <strong>ThisRecord<\/strong>.\u00a0 You can even name that record with the <strong>As<\/strong> operator, allowing you to clarify formulas and work with all the records in nested <strong>ForAll<\/strong> and <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/controls\/control-gallery\"><strong>Gallery<\/strong><\/a> controls.\u00a0 And finally, we&#8217;ve added Excel&#8217;s\u00a0<strong>Sequence<\/strong> function to generate a table containing a sequence of numbers, perfect for iterating a specific number of times with\u00a0<strong>ForAll<\/strong>.<\/p>\n<p>All of this is available with version 3.20065 or later.\u00a0 There is a bug fix required to do the chessboard example with galleries that is coming in 3.20072.\u00a0 Full documentation is being reviewed and will be posted shortly.<\/p>\n<h1>ThisRecord<\/h1>\n<p>Have you tried to use <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-patch\"><strong>Patch<\/strong><\/a>\u00a0or <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-clear-collect-clearcollect\"><strong>Collect<\/strong><\/a> within a <strong>ForAll<\/strong>?\u00a0 You quickly realize that while all the fields of the current record are readily available, the record itself is not and you need the record for <strong>Patch<\/strong> and other operations.<\/p>\n<p>What is missing is the equivalent of the <strong>Gallery<\/strong> control&#8217;s <strong>ThisItem<\/strong>.\u00a0 \u00a0And that is what we have added with <strong>ThisRecord<\/strong>.\u00a0 We didn&#8217;t call it <strong>ThisItem<\/strong> because we don&#8217;t refer to records as items except in the gallery and form controls and we also wanted to make it easy to use record scope functions in a gallery without needing to name them.<\/p>\n<p>Let&#8217;s look at a simple example.\u00a0 Here we have a gallery of products that we&#8217;d like to copy into a collection of products for this order.\u00a0 The key formula in the animation is:<\/p>\n<pre>ForAll( Filter( Gallery1.AllItems, Checkbox1.Value ),\n        Collect( MyOrder, ThisRecord ) );<\/pre>\n<p>Without\u00a0<strong>ThisRecord<\/strong>, it would be impossible to <strong>Collect<\/strong> the whole record at once, instead each field would need to be referenced individually.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-10917\" height=\"678\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif\" width=\"1392\"\/><br \/>\n<strong>ThisRecord\u00a0<\/strong>can be used with far more than just <strong>ForAll<\/strong>, it is available in any function that provides a record scope, include <strong>Filter<\/strong>, <strong>LookUp<\/strong>,\u00a0<strong>With<\/strong>, <strong>Sum<\/strong>, <strong>Sort<\/strong>, <strong>Concat<\/strong>, and many others.<\/p>\n<h1>As<\/h1>\n<p><strong>ThisItem<\/strong> and <strong>ThisRecord<\/strong> are great, but they only make the innermost record available.\u00a0 In nested situations, it is impossible to reference the record in an outer scope.\u00a0 Further, it isn&#8217;t always obvious what they are referring to, requiring the reader to look back up through the formula or Items property to understand the source of the record.<\/p>\n<p>Drawing on SQL syntax, we have adopted the <strong>As<\/strong> operator to name these records.\u00a0 It works both in the <strong>Items<\/strong> property for the <strong>Gallery<\/strong> control and the table source for record scope functions such as <strong>ForAll<\/strong>, <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-with\"><strong>With<\/strong><\/a>, <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-aggregates\"><strong>Sum<\/strong><\/a>, etc.<\/p>\n<p>Let&#8217;s look at a simple example with two nested <strong>ForAll <\/strong>functions and then two nested galleries.\u00a0 The following formula generates a chessboard text string (Viva ASCII art):<\/p>\n<pre>Concat(\u00a0\n    ForAll( Sequence(8) As Rank,\n        Concat(\n            ForAll( Sequence(8) As File,\n                    If( Mod( Rank.Value + File.Value, 2 ) = 1, \" X \", \" . \" )\n            ),\n            Value\n        ) &amp; Char(10)\n    ),\n    Value\n)<\/pre>\n<p>Setting the <strong>Text<\/strong> property of a <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/controls\/control-text-box\"><strong>Label<\/strong><\/a> control to this formula results in:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-10920\" height=\"315\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h36_32.png\" width=\"298\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h36_32.webp 298w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h36_32-284x300.webp 284w\" sizes=\"auto, (max-width: 298px) 100vw, 298px\" \/><\/p>\n<p>Let&#8217;s unpack what this formula does:<\/p>\n<ul>\n<li>We start by iterating an unnamed table of 8 numbered records generated with the new\u00a0<strong>Sequence<\/strong>\u00a0function (more about this function below).\u00a0 This outer loop is for each row of the board, which are referred to as <strong>Rank <\/strong>on a chessboard\u00a0and so we give it this name.<\/li>\n<li>For each <strong>Rank<\/strong>, we iterate another unnamed table of 8 columns, and we give this the standard chessboard name <strong>File<\/strong>.<\/li>\n<li>If <strong>Rank.Value + File.Value\u00a0<\/strong>is an odd number, the square gets an <strong>X<\/strong>, otherwise a dot.\u00a0 This part of the formula is referencing both <strong>ForAll<\/strong> loops, made possible by using the <strong>As<\/strong> operator.<\/li>\n<li><strong>Concat<\/strong> is used twice, first to assemble the columns and then the rows, with a <strong>Char(10)<\/strong> thrown in to create a newline after each <strong>Rank<\/strong>.<\/li>\n<\/ul>\n<p>Let&#8217;s look at the same example using nested gallery controls instead of\u00a0<strong>ForAll<\/strong>.\u00a0 The logic is essentially the same but distributed across three controls.\u00a0 \u00a0Note that a bug fix is needed with version 3.20072 to make this work properly.<\/p>\n<p>Let&#8217;s start with the a vertical gallery for the <strong>Rank<\/strong>.\u00a0 This gallery control will have an <strong>Items<\/strong> formula of:<\/p>\n<pre>Sequence(8) As Rank<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-10931\" height=\"594\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_22-1.png\" width=\"1005\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_22-1.webp 1005w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_22-1-300x177.webp 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_22-1-768x454.webp 768w\" sizes=\"auto, (max-width: 1005px) 100vw, 1005px\" \/><\/p>\n<p>Within this gallery, we&#8217;ll place a horizontal gallery for the <strong>File<\/strong>, that will be replicated for each <strong>Rank<\/strong>, with an <strong>Items<\/strong> property of:<\/p>\n<pre>Sequence(8) As File<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-10932\" height=\"594\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_34-1.png\" width=\"1005\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_34-1.webp 1005w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_34-1-300x177.webp 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_34-1-768x454.webp 768w\" sizes=\"auto, (max-width: 1005px) 100vw, 1005px\" \/><\/p>\n<p>And finally within this gallery, we&#8217;ll add a <strong>Label<\/strong> control that will be replicated for each <strong>File<\/strong> and each <strong>Rank<\/strong>.\u00a0 \u00a0We&#8217;ll size it to fill the entire space and use the <strong>Fill<\/strong> property to provide the color with this formula:<\/p>\n<pre>If( Mod( Rank.Value + File.Value, 2 ) = 1, Green, Beige )<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-10930\" height=\"594\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_40.png\" width=\"1005\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_40.webp 1005w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_40-300x177.webp 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_09h40_40-768x454.webp 768w\" sizes=\"auto, (max-width: 1005px) 100vw, 1005px\" \/><\/p>\n<h1>Implicit ThisItem<\/h1>\n<p>One of our motivations for doing this work was resolving naming issues within a <strong>Gallery<\/strong>.\u00a0 With the introduction of CDS relationship and polymorphic lookup support, it is easy to have the name of an entity conflict with the name a of a field.\u00a0 In an effort to be easy to use, we had been promoting all fields of <strong>ThisItem<\/strong> to be directly available within a <strong>Gallery<\/strong>, but this was now making things more confusing.<\/p>\n<p>This is what we have had in our polymorphic lookup documentation, within a gallery with <strong>Items = Accounts<\/strong>:<\/p>\n<pre>If( IsType( ThisItem.Owner, [@Teams] ),\n    \"Team: \" &amp; AsType( ThisItem.Owner, [@Teams] ).'Team Name',\n    \"User: \" &amp; AsType( ThisItem.Owner, [@Users] ).'Full Name' )<\/pre>\n<p>The global disambiguation operator <strong>[@&#8230;]<\/strong> <em>must<\/em> be used in this case because <strong>Accounts<\/strong> has Teams and Users as One-to-Many relationship.\u00a0 Implicit <strong>ThisItem<\/strong> would send the wrong thing to <strong>IsType<\/strong> and <strong>AsType<\/strong>.<\/p>\n<p>We have therefore stopped supporting implicit references in galleries.\u00a0 Don&#8217;t be alarmed, your apps should have kept working fine as we applied a converter to add <strong>ThisItem. <\/strong>to any implicit references.\u00a0 For a long time we have only been inserting field references prefixed with <strong>ThisItem.<\/strong>\u00a0so there should not have been many instances of this.\u00a0 But if you had manually typed an implicit reference in a formula it has been updated.<\/p>\n<p>With our change, the above formula now works property with simply:<\/p>\n<pre>If( IsType( ThisItem.Owner, Teams ),\n    \"Team: \" &amp; AsType( ThisItem.Owner, Teams ).'Team Name',\n    \"User: \" &amp; AsType( ThisItem.Owner, Users ).'Full Name' )<\/pre>\n<p>For record scope functions, before we introduced\u00a0<strong>ThisRecord<\/strong>, implicit references were the only way it worked.\u00a0 For the time being we have decided not to stop supporting implicit references in record scope functions.\u00a0 Name ambiguities are still possible but far less common as the <strong>Gallery<\/strong> throws in additional names with the controls.\u00a0 We&#8217;ll monitor this and listen for your feedback.<\/p>\n<h1>Sequence<\/h1>\n<p>Excel recently added the <a href=\"https:\/\/support.microsoft.com\/en-us\/office\/sequence-function-57467a98-57e0-4817-9f14-2eb78519ca90\">Sequence function<\/a> to generate an array of numbers.\u00a0 We&#8217;ve been wanting to add something similar for a while and this seemed like a good opportunity, ensuring consistency with what Excel had done.\u00a0 We did modify it slightly as we don&#8217;t have two dimensional arrays.<\/p>\n<p>It is pretty simple to use: <strong>Sequence( 10 )<\/strong> produces a table of 10 records, with a single <strong>Value<\/strong> column containing the first ten sequential numbers starting with 1.\u00a0 It is equivalent to\u00a0 writing\u00a0<strong>[1,2,3,4,5,6,7,8,9,10]<\/strong>.<\/p>\n<p>You can now iterate a specific number of times as we have already seen in this post.\u00a0 Another example that doesn&#8217;t use the value itself, you can generate 1,000 GUIDs with <strong>ForAll( Sequence( 1000 ), GUID() )<\/strong>.<\/p>\n<p>Additional arguments to the function allow you to control the starting number and increment.\u00a0 \u00a0Which means that unlike <strong>[1,2,3,&#8230;]<\/strong> notation, <strong>Sequence<\/strong> can be dynamic.\u00a0 Here is another example that produces a character map (full details are in the <a href=\"https:\/\/docs.microsoft.com\/en-us\/powerapps\/maker\/canvas-apps\/functions\/function-char\">Char function documentation<\/a>).\u00a0 The outer horizontal gallery has a simple formula that counts 8 times, starting at 0, and incrementing by 16 each time:<\/p>\n<pre>Sequence( 8, 0, 16 ) As HighNibble<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-10934\" height=\"629\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_54.png\" width=\"1403\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_54.webp 1403w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_54-300x134.webp 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_54-1024x459.webp 1024w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_54-768x344.webp 768w\" sizes=\"auto, (max-width: 1403px) 100vw, 1403px\" \/><\/p>\n<p>The inner vertical gallery fills in the values between the <strong>HighNibble<\/strong> increments by counting 16 times starting with the base value:<\/p>\n<pre>Sequence( 16, HighNibble.Value ) As FullCode<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-10935\" height=\"629\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_59.png\" width=\"1403\" srcset=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_59.webp 1403w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_59-300x134.webp 300w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_59-1024x459.webp 1024w, https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h08_59-768x344.webp 768w\" sizes=\"auto, (max-width: 1403px) 100vw, 1403px\" \/><\/p>\n<p>And then the label control inside the second gallery just needs to covert <strong>FullCode.Value<\/strong> to a character:<\/p>\n<pre>Char( FullCode.Value )<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" class=\"alignnone size-full wp-image-10936\" height=\"629\" src=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-19_13h18_39.png\" width=\"1403\"\/><\/p>\n<p>Note that <strong>Sequence<\/strong> is limited to 50,000 records.\u00a0 We believe it is a large enough number for most scenarios, but not so large that major performance delays should be experienced by end users.\u00a0 A reasonable limit continues to prevent infinite or near-infinite loops.\u00a0 But please use large values with care.\u00a0 Generating a large sequence table isn&#8217;t a problem, it is what you may do with it in <strong>ForAll<\/strong> that could take a lot of time or memory.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can now refer to the whole record in\u00a0ForAll and other record scope functions with ThisRecord.\u00a0 You can even name that record with the As operator, allowing you to clarify formulas and work with all the records in nested ForAll and Gallery controls.\u00a0 And finally, we&#8217;ve added Excel&#8217;s\u00a0Sequence function to generate a table containing a sequence of numbers, perfect for iterating a specific number of times with\u00a0ForAll.<\/p>\n","protected":false},"author":86,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ms_queue_id":[],"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","_alt_title":"","ms-ems-related-posts":[],"footnotes":""},"audience":[3378],"content-type":[3424],"job-role":[],"product":[3473],"property":[],"topic":[3421],"coauthors":[2104],"class_list":["post-10914","post","type-post","status-publish","format-standard","hentry","audience-it-professional","content-type-news","product-power-apps","topic-application-modernization"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Formulas: ThisRecord, As, and Sequence - Microsoft Power Platform Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Formulas: ThisRecord, As, and Sequence - Microsoft Power Platform Blog\" \/>\n<meta property=\"og:description\" content=\"You can now refer to the whole record in\u00a0ForAll and other record scope functions with ThisRecord.\u00a0 You can even name that record with the As operator, allowing you to clarify formulas and work with all the records in nested ForAll and Gallery controls.\u00a0 And finally, we&#039;ve added Excel&#039;s\u00a0Sequence function to generate a table containing a sequence of numbers, perfect for iterating a specific number of times with\u00a0ForAll.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/power-apps\/formulas-thisrecord-as-and-sequence\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft Power Platform Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-20T12:00:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-11T14:58:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"1392\" \/>\n\t<meta property=\"og:image:height\" content=\"678\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Greg Lindhorst\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Greg Lindhorst\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/\"},\"author\":[{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/author\/greg-lindhorst\/\",\"@type\":\"Person\",\"@name\":\"Greg Lindhorst\"}],\"headline\":\"Formulas: ThisRecord, As, and Sequence\",\"datePublished\":\"2020-07-20T12:00:18+00:00\",\"dateModified\":\"2025-06-11T14:58:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/\"},\"wordCount\":1267,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif\",\"keywords\":[\"Dataverse\",\"Formulas\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/\",\"url\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/\",\"name\":\"Formulas: ThisRecord, As, and Sequence - Microsoft Power Platform Blog\",\"isPartOf\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif\",\"datePublished\":\"2020-07-20T12:00:18+00:00\",\"dateModified\":\"2025-06-11T14:58:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#primaryimage\",\"url\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif\",\"contentUrl\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif\",\"width\":1392,\"height\":678,\"caption\":\"graphical user interface, application\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Formulas: ThisRecord, As, and Sequence\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#website\",\"url\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/\",\"name\":\"Microsoft Power Platform Blog\",\"description\":\"Innovate with Business Apps\",\"publisher\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#organization\",\"name\":\"Microsoft Power Platform Blog\",\"url\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/03\/Microsoft-Logo-e1685482038800.png\",\"contentUrl\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/03\/Microsoft-Logo-e1685482038800.png\",\"width\":194,\"height\":145,\"caption\":\"Microsoft Power Platform Blog\"},\"image\":{\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#\/schema\/person\/dbd4cb8af4503e696f240353831f05d4\",\"name\":\"Greg Lindhorst\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g0133d144d5ed416197bd3b29ccd9a59c\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g\",\"caption\":\"Greg Lindhorst\"},\"url\":\"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/author\/gregli\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Formulas: ThisRecord, As, and Sequence - Microsoft Power Platform Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/","og_locale":"en_US","og_type":"article","og_title":"Formulas: ThisRecord, As, and Sequence - Microsoft Power Platform Blog","og_description":"You can now refer to the whole record in\u00a0ForAll and other record scope functions with ThisRecord.\u00a0 You can even name that record with the As operator, allowing you to clarify formulas and work with all the records in nested ForAll and Gallery controls.\u00a0 And finally, we've added Excel's\u00a0Sequence function to generate a table containing a sequence of numbers, perfect for iterating a specific number of times with\u00a0ForAll.","og_url":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/power-apps\/formulas-thisrecord-as-and-sequence\/","og_site_name":"Microsoft Power Platform Blog","article_published_time":"2020-07-20T12:00:18+00:00","article_modified_time":"2025-06-11T14:58:11+00:00","og_image":[{"width":1392,"height":678,"url":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif","type":"image\/gif"}],"author":"Greg Lindhorst","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Greg Lindhorst","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#article","isPartOf":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/"},"author":[{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/author\/greg-lindhorst\/","@type":"Person","@name":"Greg Lindhorst"}],"headline":"Formulas: ThisRecord, As, and Sequence","datePublished":"2020-07-20T12:00:18+00:00","dateModified":"2025-06-11T14:58:11+00:00","mainEntityOfPage":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/"},"wordCount":1267,"commentCount":0,"publisher":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#organization"},"image":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#primaryimage"},"thumbnailUrl":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif","keywords":["Dataverse","Formulas"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/","url":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/","name":"Formulas: ThisRecord, As, and Sequence - Microsoft Power Platform Blog","isPartOf":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#primaryimage"},"image":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#primaryimage"},"thumbnailUrl":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif","datePublished":"2020-07-20T12:00:18+00:00","dateModified":"2025-06-11T14:58:11+00:00","breadcrumb":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#primaryimage","url":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif","contentUrl":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/07\/2020-07-18_15h01_42.gif","width":1392,"height":678,"caption":"graphical user interface, application"},{"@type":"BreadcrumbList","@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/2020\/07\/20\/formulas-thisrecord-as-and-sequence\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/"},{"@type":"ListItem","position":2,"name":"Formulas: ThisRecord, As, and Sequence"}]},{"@type":"WebSite","@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#website","url":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/","name":"Microsoft Power Platform Blog","description":"Innovate with Business Apps","publisher":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#organization","name":"Microsoft Power Platform Blog","url":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/03\/Microsoft-Logo-e1685482038800.png","contentUrl":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-content\/uploads\/2020\/03\/Microsoft-Logo-e1685482038800.png","width":194,"height":145,"caption":"Microsoft Power Platform Blog"},"image":{"@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/#\/schema\/person\/dbd4cb8af4503e696f240353831f05d4","name":"Greg Lindhorst","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g0133d144d5ed416197bd3b29ccd9a59c","url":"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d2e26bc357423265c4eeeb6a4ed51bd71fb29b8eced3e31f4bc1ccd5bedaf80f?s=96&d=mm&r=g","caption":"Greg Lindhorst"},"url":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/author\/gregli\/"}]}},"bloginabox_animated_featured_image":null,"bloginabox_display_generated_audio":false,"distributor_meta":false,"distributor_terms":false,"distributor_media":false,"distributor_original_site_name":"Microsoft Power Platform Blog","distributor_original_site_url":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog","push-errors":false,"_links":{"self":[{"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts\/10914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/users\/86"}],"replies":[{"embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/comments?post=10914"}],"version-history":[{"count":1,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts\/10914\/revisions"}],"predecessor-version":[{"id":130570,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/posts\/10914\/revisions\/130570"}],"wp:attachment":[{"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/media?parent=10914"}],"wp:term":[{"taxonomy":"audience","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/audience?post=10914"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/content-type?post=10914"},{"taxonomy":"job-role","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/job-role?post=10914"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/product?post=10914"},{"taxonomy":"property","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/property?post=10914"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/topic?post=10914"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/cm-edgetun.pages.dev\/en-us\/power-platform\/blog\/wp-json\/wp\/v2\/coauthors?post=10914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}