cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raoraheel
Helper I
Helper I

Convert D365 Account Number to String

Hello all, i'm working on a power automate flow where part of it is extract Vendors from D365 F&O and populating them in a sharepoint list. In doing so, the account number field is being converted to an integer(stripping off leading zeros). Do you guys have any suggestion as to how to achieve this with 'low code'? I even tried putting in a compose but that didn't work.

 

Below is what I am working with. Let me know what your thoughts are please. Thanks

 

Screen Shot 2021-07-19 at 1.27.26 PM.png

@abm @Expiscornovus appreciate if you have any suggestions for me please. Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @raoraheel,

 

My bad. I thought you were using a number column, I should have checked that first.

 

Can you share the raw outputs of both the list items present in table and create item in SharePoint actions?

 

I haven't been able to reproduce this issue in my setup. Below are a couple of screenshots of my test.

 

1. Using a Vendor Account with 000123456, added that manually.

 

vendoraccount.png

 

2. Create an item in SharePoint. I have mapped the Vendor Account field to a single line of text column (Title) and a number column (Account Number).createaccount.png

 

3. The raw output shows that the single line of text should keep the leading zeros. The account number doesn't.

rawoutput_vendoraccount.png

4. The end result for both columns is with leading zeros (because I applied those custom symbols to my number column).

 

vendoraccountnumber.png

 

 

View solution in original post

6 REPLIES 6
Expiscornovus
Super User
Super User

Hi @raoraheel,

 

A workaround could be to use custom symbols on your number column in the SharePoint list. You could add the zeros in there on the left. This way you don't have to change your Power Automate flow.

 

Alternatively, you could also change the column from number type to single line of text type.

 

leadingsymbols.png

 

 

abm
Super User
Super User

Hi @raoraheel 

 

What's the SharePoint list account number column data type?

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
raoraheel
Helper I
Helper I

I’m storing this value in the Tile field which is already data type Single line of text.

Appending zero won’t work as the account number is not sequence number generated but a manually entered number. 

Expiscornovus
Super User
Super User

Hi @raoraheel,

 

My bad. I thought you were using a number column, I should have checked that first.

 

Can you share the raw outputs of both the list items present in table and create item in SharePoint actions?

 

I haven't been able to reproduce this issue in my setup. Below are a couple of screenshots of my test.

 

1. Using a Vendor Account with 000123456, added that manually.

 

vendoraccount.png

 

2. Create an item in SharePoint. I have mapped the Vendor Account field to a single line of text column (Title) and a number column (Account Number).createaccount.png

 

3. The raw output shows that the single line of text should keep the leading zeros. The account number doesn't.

rawoutput_vendoraccount.png

4. The end result for both columns is with leading zeros (because I applied those custom symbols to my number column).

 

vendoraccountnumber.png

 

 

abm
Super User
Super User

Hi @raoraheel 

 

Check the data type of Vendor Account.

 

image.png



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

It was a data type issue. All set now and what you did here is how I was able to get it to work.

Thanks so much!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,824)