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

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Electronic reporting: parsing txt file (bank statement import), dealing with empty values

(0) ShareShare
ReportReport
Posted on by 55

Hello everyone!

I have recently encountered a problem and I can't find an appropriate solution.

I'm trying to configure import for a bank statement in txt format.

The configuration is the following:

pastedimage1626978709574v3.png

There are DateSentSeq and there is DateReceivedSeq below (isn't present on the pic) that looks exactly the same.

They are both linked to Data Model. 

In some cases only one of this fields has a value in the txt file. I mean that sometimes it looks like:

DateSent=

DateReceived=22.07.2021

And in these cases the payment lines do not appear in Imported statement (no warnings appear either).

For example, DateSent is linked to Request Execution Date in Data model. I tried to changed the formula in order to replace this value in case it is empty (if (DateSent = EMPTYDATE(), DateReceived, DateSent).

But it didn't work. Moreover, it seems that no formulas work when I'm trying to address DateSent and DateReceived, the only thing that works is a direct link to one of them.

For example, Requested Execution Date = @.SectionTypes.Documents.Data.Document.'$DateSent'.DocumentAttrTypes.DateSentSeq.Data.DateSent - this works perfectly (except for empty value).

Requested Execution Date = IF(@.SectionTypes.Documents.Data.Document.'$DateSent'.DocumentAttrTypes.DateSentSeq.Data.DateSent.......) - this doesn't work.

Could anyone please provide me with any tip? I would be very grateful!

I have the same question (0)
  • Kseniya Profile Picture
    55 on at
    RE: Electronic reporting: parsing txt file (bank statement import), dealing with empty values

    Finally, I figured out how to use your tip. I was mistakenly trying to give a multiplicity to the sequence instead of field. When I did everything correctly, it worked (I used then "isMatched" in formulas to check the fields for emptiness). Thank you very much again.

  • Kseniya Profile Picture
    55 on at
    RE: Electronic reporting: parsing txt file (bank statement import), dealing with empty values

    The weird thing is that is always works while testing, it also worked when I tried other formulas :( But when I import txt the lines are not created in Imported statement form. It looks like when the algorythm is creating a line and misses the DateSent value it just doesn't go further. Although the calculated RequestExecutionDate goes to WithdrawalDate, it seems it doesn't work . My only assumption is that it is somehow connected with the usage of imported data: the lines are created one by one, perhaps I cannot use such formulas in this case? I mean that DateSent and DateReceived appear several times in the txt file, and each one goes to particular line. The first document is parsed, then it goes to the second section that has the same patterns but different values and so on. Electronic Reporting is a completely new tool for me, but I keep struggling :)) Unfortunately, in this case I can't figure out what else to try.

  • Arcadi  Profile Picture
    788 on at
    RE: Electronic reporting: parsing txt file (bank statement import), dealing with empty values

    Where you edit formulas at the top there is a "test" button. Could you try it with the values that you think it parses from those fields? also instead of @.DateReceived I would try Today() just to debug

  • Kseniya Profile Picture
    55 on at
    RE: Electronic reporting: parsing txt file (bank statement import), dealing with empty values

    Thank you very much for your response! Unfortunately, it didn't work (or I made a mistake).

    The first option is not applicable because I can't use 0..1 (got a warning - Sequence component ‘DocumentAttrSeq’ can contain an optional nested component (with the multiplicity value ‘ZeroOne’ or ‘ZeroMany’) only below all other nested components. Violation of this rule may cause the endless loop at run-time parsing of incoming file.)

    I tried the second option but I didn't succeed. There are no errors, but the line just doesn't appear in Imported statement.

    I changed data format and then used the suggested formula in Data model: IF(@.SectionTypes.Documents.Data.Document.'$DateSent'.DocumentAttrTypes.DateSentSeq.Data.DateSentStr = "", @.SectionTypes.Documents.Data.Document.'$DateSent'.DocumentAttrTypes.DateReceivedSeq.Data.DateReceived, DATEVALUE(@.SectionTypes.Documents.Data.Document.'$DateSent'.DocumentAttrTypes.DateSentSeq.Data.DateSentStr, "dd.MM.yyyy"))

  • Suggested answer
    Arcadi  Profile Picture
    788 on at
    RE: Electronic reporting: parsing txt file (bank statement import), dealing with empty values

    You get an error when date is blank? You could either give a multiplicity to that field (0...1) or just import it as a string, and then transform it to Date like

    IF(@.String="",@.DateReceived,DATEVALUE(@.String,"dd.MM.yyyy"))

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 2,257

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 913 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 611 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans