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 blogPower 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

 

 

View solution in original post

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 blogPower 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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,020)