I ran into an issue where an InfoPath 2013 form had some Decimal (double) fields, and they were nicely displayed as currency in the View controls. However when these fields were promoted as properties when the form got published to Office 365 SharePoint Online, the system automatically created SharePoint Number columns (which you cannot edit like normal metadata columns). And those numbers won’t display as currency on a dashboard web part.
The great Google didn’t have any great tips for this issue today (lots of forum discussions veer off into calculated fields and formulas), and S.Y.M. Wong-a-ton didn’t have any quick tips (which is shocking! Thanks for all the great posts S.Y.M!). Travis Nay did ask a great question in the Office 365 Community Forum but didn’t get a great response unfortunately https://community.office365.com/en-us/f/172/t/224163.
So at first I made a field and tried to use the concatenate function in a string field to make it look like currency, but it seemed inelegant and the final decimal place wouldn’t display nicely. I briefly thought about using a simple workflow to copy data from one field and write it into another, but again it seemed inelegant.
Then I recalled there was a way to first create a native SharePoint column, and next promote an InfoPath field into that pre-existing column. So I created a new Currency metadata column in the library in SharePoint Online and jumped into InfoPath Designer 2013 and cracked open the File tab > Form Options > Property Promotion. However there was no option to connect to an existing SharePoint Library column there… After a bit more clicking and head scratching, here’s the codeless recipe using Property Promotion during the full form publishing process:
- Create a new SharePoint metadata column with the data type Currency in the SharePoint Online UI (set your Number of decimal places to 2 just to be safe)
- Open your form template in InfoPath Designer
- Click File > Publish > SharePoint Server and walk through the wizard until you see “The fields listed below will be available as columns in SharePoint sites and Outlook folders.”
- Click Add
- Pick your Decimal (double) field
- Change Site column group to (This form library)
- Under Column name choose the currency column you made in step 1
- Click Ok
- Finish publishing the form
Now you can see your InfoPath 2013 decimal (double) field data in SharePoint Online currency metadata columns and make your business users happy.