This topic is locked

NOT IMPORT THE SAME FILE NAME TWICE

12/28/2023 6:15:37 AM
PHPRunner General questions
konenamogo author

Hello
We have a system that generates 10 unique name files every day. Each line in each of the files has no keys.
We made a mapping to import each of the files in order to generate a report.
We want to be sure that a user will not import the same file more than twice.
also we want to know how to avoid importing the same file twice with phprunner 10.8 enterprise edition ?
How can i do it ?

Thanks

HJB 12/28/2023

I think, you need to differ between FILE NAME and IMPORTED RECORDS in first instance
to achieve the solution you are looking for, here, to avoid DUPLICATION OF IMPORTED
RECORDS. My assumption is, the records shape is like as seen under https://asprunner.com/forums/topic/30270-Export-excel-format-without-header-line
and so, looking at the record structure and entries, a simple click on "Prevent duplicate values",
under "EDIT AS" settings should be sufficient to solve the problem.
Otherwise, view the Youtube video under https://www.youtube.com/watch?v=E0rWkmaPtSs

img alt

konenamogo author 12/29/2023

Hi HJB
we can have identical lines. This does not pose a problem.
It is not the probem of records. the question is very clear (not import the same file more than twice).

We want to be sure that a user will not import the same file name more than twice.
also we want to know how to avoid importing the same file name twice with phprunner 10.8 enterprise edition ?
How can i do it ?

Thanks

HJB 12/29/2023

Sure, to let whatsoever version of PHPRunner take control, there must be something
in place to reference to, namely a table containing the already uploaded file names.
Thereafter, a lookup or if/then query has to be implemented into the upload functionality,
by hand coding.

konenamogo author 12/29/2023

Hi HJB

I agree with you for using a table which will insert the name of the files in order to display an error message (for example) if the name of the file exists in the table.
What is the method for inserting the file name into a table from the file import with phprunner enterprise 10.8 ?

HJB 12/29/2023

https://asprunner.com/forums/topic/30281-Generating-an-unique-invoice-number

Admin's tipp as per URL above is s good guide on how to create an ID number to be
generated BEFORE the file is saved. Such kind of functionality is essential to somehow
make nearly 100% sure, record numbering shall not cause trouble shooting later on.

In other words, if you add an additional ID field into the landing page of your uploaders
after login, a UNIQUE ID can be displayed to them, enabling them to first manually
change the file name to that very displayed ID number BEFORE the upload is going
to happen.

Automatic control via PHPRunner, as for me, seems to be out of reach. Why?

Well, I'm assuming your uploaders to fill Excel spreadsheets on daily basis and
are providing the entered records by uploads into your site. So, their work done
is not part of PHPRunner functionality at all and hence, they cannot give the file
to be uploaded a unique name, unless, they are getting a unique ID after login,
enabling them to change the upload file name BEFORE the upload is done.

Finally, using such solution, it would be mandatory to set the ID displaying field
inside the uploader's landing age after login to "Prevent duplicate values" which
shall sent an ERROR message to them by then.

I have to admit, this "manually" driven solution stands versus your wished automated
solution from the PHPRunner 10.8 point of view, yet as I said before (if my assumption
is right on the work flow and absence of the uploaders from your site until they start to
upload the Excel file for import into your system), yet as for me, it's the only way to go.

konenamogo author 12/30/2023

Hi

you didn't answer my question HJB.

We want to be sure that a user will not import the same file name more than twice.

How can i do it by using a table which will insert the name of the files in order to display an error message (for example) if the name of the file exists in the table ?

Is there anyone who can clearly answer my concern please?

Thanks

fhumanes 12/31/2023

Hello,

I believe that this method of climbing a Zip file for importation can be the solution to the duplicate controls of files and control over imports.

https://fhumanes.com/blog/guias-desarrollo/guia-54-utilizacion-de-ficheros-zip-para-transportar-contenidos/

Greetings,
fernando

HJB 12/31/2023

@fernando

quoting a statement of a leading NO CODE apps developing CEO in Germany

As a software consultant for many years in the field of NO CODE creation of applications,
I have repeatedly experienced on the recording of the customer's requirements and
specifications that the WORK PROCESS to be digitized was never questioned until then,
and only when trying to transform this process into software, the customers first began
to rethink and to first improve the relevant WORK PROCESS.

unquote

In short, I think, the work process should first be somehow improved here BEFORE
the Low Code appliance by means of PHPRunner is entering the work scene.
So, while my proposal to provide a unique ID on per file basis BEFORE upload was
somehow regard to be non-sense respectively no answer at all, I didn't want miss
to inform of what experienced ones in this industry had been watching all the time.

fhumanes 1/2/2024

Sorry, @HJB

I do not understand the message you have addressed to me.

I can agree with your CEO, that before computerizing something, it is necessary to analyze the process in case it can be simplified, whether using a "no code" solution or "measure" development.

Greetings,
fernando

HJB 1/2/2024

@ Fernando,
definitely NO need to feel somehow insulted. Fact remains, the work flow is wrong in this case.
It's more likely a human to give a file a unique name BEFORE upload, e.g. "fernando-01.01.24
plus maybe a time" to solve the problem, rather than a task of a custokmk code to get somehow
into PHPRunner's vast coding eco-system. And in regard to the CEO, and his NO CODE oriented
customers I need to tell you this. His clients are truly suffering, simply because the data streams
ending up on the servers are only updated ONCE a day (because of storage in Excel tables only)
while the BI system behind is generally okay for most clients. Yet as for me, the vital term named
REAL-TIME DATA is missing here, say, of course I succeed to bridge the problem by PHPRunner
and its REST API to somehow get the CEO's into the future, yet, what to do?
Telling an CEO like that he is sitting on the wrong product on the long run? No good idea at all.
So, R.I.P. to him and his clients now and forever ...

fhumanes 1/2/2024

Hi @HJB

I am not upset, nor has it bothered me.

I still don't understand your message.

If I have bothered you, I'm sorry, it wasn't my intention.

Greetings,
fernando

HJB 1/3/2024

@ Fernando,
for better understanding purposes. Given, you have ONE PHPRUNNER app
on the one hand (to absorb file uploads) and on the other hand you have maybe
10 or so individuals who are hammering data into Excel sheets on daily basis to
upload the gathered data at the end of day by import of files into the eco-system
named PHPRUNNER app. So far to what is the case here.
Now, rather than to instruct the individuals to name their file under unique basis,
e.g. by date, time and initials for example, this thread deals around on how to
automate or better to say, to instruct PHPRUNNER to prevent individuals to
upload files TWICE. And I hope, you are understanding it better by now.