Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Compare .csv file to active table with unsaved data

$
0
0

Hello

I'm open a Journal form and writing an records to that journal. I haven't saved it or doing anything unless just create some records.

Then there is a button on the Journal form who I have created named "Import file for comparison" - and then a RunBase dialog appear who give me opportunity to import a file and do some comparison work.

Here is a code snippet who display information in the file into infolog box.

But I need to compare the records who is open in my form, to the information in the CSV file.

If (!file || file.status() != IO_Status::Ok)
{
throw error("File cannot be opened");
}

line = file.read();

while (file.status() == IO_Status::Ok)
{
info(con2Str(line, '-'));
line = file.read();
}

The While statement needs to be modified. The code isn't exactly what I'm doing but we can assume that "info" line in the while statement should be replaced with statement who compare the line in the file with the active records in the form and the output should be something that doen't matter.

I just need to know what trigger the active table in the form so I can compare with the imported file. 


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>