web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Generate Sequence Numb...
Power Automate
Answered

Generate Sequence Number using the select action for Smartsheet

(0) ShareShare
ReportReport
Posted on by 7

Hello everyone

 

I am trying to replicate this tutorial but for Smart Sheet.

https://www.youtube.com/watch?v=ffrDHr8DKF8&t=4s

 

But is not working for me

PowerArturo_0-1710974126063.png

 

The code view is the following

 

{
  "type": "Select",
  "inputs": {
    "from": "@range(1,length(outputs('Get_a_sheet_data_(dynamic_schema)')?['body/value']))",
    "select": {
      "ID": "@add(item(),1)",
      "primary": "@outputs('Get_a_sheet_data_(dynamic_schema)')?['body/value'][item()]['Primary Column']"
    }
  },
  "runAfter": {
    "Get_a_sheet_data_(dynamic_schema)": [
      "Succeeded"
    ]
  }
 
InvalidTemplate
The execution of template action 'Select' failed: The evaluation of 'query' action 'where' expression '{ "ID": "@add(item(),1)", "primary": "@outputs('Get_a_sheet_data_(dynamic_schema)')?['body/value'][item()]['Primary Column']" }' failed: 'The template language expression 'outputs('Get_a_sheet_data_(dynamic_schema)')?['body/value'][item()]['Primary Column']' cannot be evaluated because property 'Primary Column' doesn't exist, available properties are ''
 
I double check case sensitive and still the error
 
I made a work around
PowerArturo_1-1710974173729.png

 

{
  "type": "Select",
  "inputs": {
    "from": "@range(1,length(outputs('Get_a_sheet_data_(dynamic_schema)')?['body/value']))",
    "select": {
      "ID": "@add(item(),1)",
      "primary": "@items('For_each')?['Primary Column']"
    }
  }
}
 
it kinda works, but it repeats the first row of Primary Column every time
 
any advice I really apreciate it
 
 
Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    Can you share the output of this action?

    SudeepGhatakNZ_0-1710981001893.png

     

     

  • Verified answer
    v-yetonggu-msft Profile Picture
    on at

    Hi @PowerArturo ,

    1.The formula for from in your select was written incorrectly.

    vyetonggumsft_3-1710988293881.png

    2.After many tests I have found out if there is a null value in your Primary Column, this will cause Flow to display an error that your Primary Column does not exist.
    I've modified your flow even further and added a few steps that can solve your problem.
    My SmartSheet Table:
    vyetonggumsft_1-1710993321744.png

    My Flow:

    vyetonggumsft_2-1710993348401.png
    vyetonggumsft_6-1710990917673.pngvyetonggumsft_3-1710994393365.png

    range(0,length(outputs('Get_a_sheet_data_(dynamic_schema)')?['body/value']))

    add(1,item())

    if(empty(string(items('Apply_to_each')?['Primary Column'])),null,items('Apply_to_each')?['Primary Column'])

    outputs('Get_a_sheet_data_(dynamic_schema)')?['body/value'][item()]['End Date']

    body('Select')[variables('Index')]

     

    While I know it's a bit tedious, it's the best way I can come up with without modifying the data source.

    Best Regards,

    Sunshine Gu

  • PowerArturo Profile Picture
    7 on at

    thanks for the work arround, it works as you mention is a little bit more tedious but gets the work done

     

  • PowerArturo Profile Picture
    7 on at

    Hi @v-yetonggu-msft  hope you are doing fine, I have a question

    I am trying to use the outcome of this flow to update a share point list, but I not able to do it, any ideas?

    Capture.PNG

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 378 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 273 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 135 Most Valuable Professional

Last 30 days Overall leaderboard