Convert a CreditAmount into a positive value ?

GP_GeekGP_Geek Posts: 2Expensify Customer Expensify Newcomer

I'm trying to do an integration from Expensify into Dynamics GP by using SmartConnect.. So far I was able to figure out how to generate the master UserIdentity and secret key, but that was it.

I've created a custom Excel Export format that I want to pull thru the API by submitting a JSON request, but only have vague theoretical idea on how to do this with SmartConnect. If anyone has done this in the past, help would be greatly appreciated.

Also, my format uses a DEBIT & CREDIT column for the amounts as the ERP system is easier to feed so, but the ouput result returns a negative sign in front of the CREDIT amounts.. I wanted to remove that by adding *-1 to the formula, but now the field remains empty.. ??

{expense:creditamount*-1:unformatted:nosymbol:negsign}

Best Answer

  • Nicole TrepanierNicole Trepanier Posts: 586 Expensify Success Coach
    edited April 19 Accepted Answer

    Hi @GP_Geek! Have you walked through the API documentation here for the Expensify side of things. I don't know a lot about the API on SmartConnect but they have some great documentation here.

    For your export formula you would need to add {math: *1} to your formula so it would look like this {math: {expense:creditamount:unformatted:nosymbol:negsign}*-1}. Let me know if that helps!

Answers

  • GP_GeekGP_Geek Posts: 2Expensify Customer Expensify Newcomer

    Hi @Nicole Trepanier ,

    Thank you very much !! the added math command did the job and allowed me to export the data without the negative symbol.

    As for the API, it's not so much how the query should be written in JSON as there are some good example in the doc page in Expensify, but how to put that script into action on the eOne SmartConnect side.. I've not found a single hint on how that would be done from within a map.. I'm going to keep digging and see if I can find out how this is supposed to happen.

    Thanks again for the tip.

Sign In or Register to comment.