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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Auto fill asset tag
Power Apps
Answered

Auto fill asset tag

(0) ShareShare
ReportReport
Posted on by 42

Dear All,

thank you for reading.

I am having issue whereby on a data fill i am not able to get the fill to auto populated base on the asset tag.

base on the formula, that my Asset_Tag is TAKSG000039 +1 which i believe i am suppose to get TAKSG000040

but somehow the fill for my asset tag will alway appear as 1.
how can i resolve this?

Winterkid_0-1617684374505.png

 

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,574 Most Valuable Professional on at

    Hi @Winterkid ,

    TAKSG000039 is Text, not a number, so you cannot add 1 to it (you will get 1). Assuming it will always have five leading letters (this is more complex than you thought . . .) 

    With(
     {
     wNo: 
     With(
     {wTag: Last(IT_ASSET).Asset_Tag},
     Value(
     Right(
     wTag,
     Len(wTag) - 5
     )
     )
     ),
     wPre: 
     Left(
     Last(IT_ASSET).Asset_Tag,
     5
     )
     },
     wPre & 
     If(
     wNo < 100,
     "0000",
     wNo < 1000,
     "000",
     wNo < 10000,
     "00",
     wNo < 100000,
     "0"
     ) & Text(wNo + 1)
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • eka24 Profile Picture
    20,925 on at

    I have a tutorial on auto increment

    https://youtu.be/wsaMirkf3Pc

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • Winterkid Profile Picture
    42 on at

    Hi @WarrenBelz 
    Wow This work, and it way too complicated. Didn't think that it will end up that complicated.
    Thank you spending times for coming up with the formulas.
    Would it be better if i recreate the list and use the sharepoint ID to tag together with asset tag.

  • WarrenBelz Profile Picture
    156,574 Most Valuable Professional on at

    @Winterkid ,

    A bit less complex - but will skip a number if something is deleted

    With(
     {
     wNo: 
     ThisItem.ID
     },
     "TAKSG" & 
     If(
     wNo < 100,
     "0000",
     wNo < 1000,
     "000",
     wNo < 10000,
     "00",
     wNo < 100000,
     "0"
     ) & Text(wNo + 1)
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Winterkid Profile Picture
    42 on at

    @WarrenBelz 

    what about if i were to use the Sharepoint ID columns?
    i dont mind redoing the sharepoint list to make it simpler.

  • WarrenBelz Profile Picture
    156,574 Most Valuable Professional on at

    @Winterkid ,

    I am using the ID in the example below I posted earlier.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Winterkid Profile Picture
    42 on at

    ohh sorry my bad.

  • Winterkid Profile Picture
    42 on at

    hi @WarrenBelz 

    sorry to trouble you again.
    i am confuse now, each time when i click on the Addbutton, it will goes to the add item page.
    the asset tag now will only just keep showing TAKSG000001 no matter how many Asset id been use.

    Winterkid_0-1617785533619.png

     


    also on the sharepoint instead of showing 1,2,3 it show four, five instead of number.
    i am confuse if i did wrongly.

    Winterkid_1-1617785554953.png

     

  • WarrenBelz Profile Picture
    156,574 Most Valuable Professional on at

    @Winterkid ,

    Where did you put the code and exactly (in Text) what did you use? Understand I used ThisItem assuming you knew what this meant - you need the ID of the current item selected.

  • Winterkid Profile Picture
    42 on at


    it under default,

    Winterkid_1-1617789023014.png

    and i use this,

     

    Winterkid_2-1617789181799.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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard