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 / Increment a serial num...
Power Automate
Unanswered

Increment a serial number in dataverse

(0) ShareShare
ReportReport
Posted on by 49

Hello Community

I'm a brand new user of powerapps and powerautomate. I'm trying to a make a system that track tools.
I've made 3 tables (Employees, Tools, and OverviewTools). The idea is to make a toolbox that consist of many different tools, depending on which appartment you will work in. 

Jakob_hjort_0-1692880146998.png

So when you press the button "Opret" (the trigger) collects the type of tool (EL) and a employee (Blacked out), you have selected and and the flow should then create a new row in the OverviewTools table. so far i got the increment variable intialized but the the dublicates and do not start from the last used number. can you help me?

Jakob_hjort_3-1692880795905.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

My flow looks like this:

Jakob_hjort_1-1692880706808.png

Jakob_hjort_4-1692880862401.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I've got another issue, that i will not post my the users, it gives this error: ')' or ',' expected at position 4 in '(xxx@xxxx.dk)'.

 

Hope you can help me out.

 


 

Categories:
I have the same question (0)
  • Verified answer
    v-jefferni Profile Picture
    on at

    Hi @Jakob_hjort ,

     

    You should use a Compose action under List rows, get the last record's serialnumber value and get the number via an expression:

    string(add(int(substring(last(outputs('List_rows')?['body/value'])?['Serienummer'],2)),1)

     

    The increment variable is not needed. And 'Add a new row' action should be out of Apply to each, input U and follow it use the Compose output to populate the Serienummer field.

     

    Best regards,

  • Linn Zaw Win Profile Picture
    2,996 on at

    @Jakob_hjort 

    For another issue, if the Employees parameter is optional and if it can be empty, you will have to set the lookup dynamically using an expression as in the blog post below.

    https://linnzawwin.blogspot.com/2020/07/how-to-set-lookup-fields-with-null.html

     

     

  • Jakob_hjort Profile Picture
    49 on at

    Thanks for the help and advices. I finnaly had time to get back to it. Though i could not make 

    string(add(int(substring(last(outputs('List_rows')?['body/value'])?['Serienummer'],2)),1)

    to work for some reason, unknown, clearly my automate skills!! 😛  i did make a work around. In my dataverse table i made a column with autonumber wich did the job for me, aswell it didn't need to be sorted ascending anyway. About the name problem. Ive solved the problem by following Power automate Dataverse Lookup - How to write to the hard column - YouTube.

    Jakob_hjort_0-1695041104836.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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard