Studio 4 Import data
I think sys(22) will return the name of the current import file. Perhaps try
adding in an ok message displaying sys(22) to see what file is actually
open.
Cheers
Simon
—–Original Message—–
From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On Behalf
Of Wendy
Sent: 22 August 2017 14:44
To: ‘OmnisDev List – English’ <omnisdev-en@lists.omnis-dev.com>
Subject: RE: Studio 4 Import data
Hi Rudolf
Following are the 2 paths – to me they look identical
The actual file has 2 records in it and the one imported from the calculated
path has 3 – they are the correct format but the wrong information. – its as
if there is another file lurking somewhere but a search has found no other
file on my computer with that name.
Path from Prompt
C:REMOTERU.DLD
calculated path
C:REMOTERU.DLD
Wendy
—–Original Message—–
From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On Behalf
Of Rudolf Bargholz
Sent: 22 August 2017 14:01
To: OmnisDev List – English
Subject: AW: Studio 4 Import data
Hi Wendy,
There must be an issue with your path or your access rights to the file or
folder you are accessing. Could it be that you are importing three records
as the list has a trailing carriage return. Or perhaps the user copied and
pasted the path into a field in Omnis, and the text has special characters
you can’t see and are causing your Omnis code to fail.
Regards
Rudolf
—–Ursprüngliche Nachricht—–
Von: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] Im Auftrag
von Wendy
Gesendet: Dienstag, 22. August 2017 13:20
An: ‘OmnisDev List – English’ <omnisdev-en@lists.omnis-dev.com>
Betreff: RE: Studio 4 Import data
Hi Rudolf
Adding the FileOps prompts for the file name – and that works
The path to the file is held in my data and I calculate the full path which
is correct
I have tried adding a ‘Test if file exists’ which comes back true but the
information imported is not correct – the import file has 2 records but the
information imported has 3 🙁 and is different
Wendy
—–Original Message—–
From: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] On Behalf
Of Rudolf Bargholz
Sent: 22 August 2017 11:56
To: OmnisDev List – English
Subject: AW: Studio 4 Import data
Hi Wendy,
Here two options from our productive code:
If FileOps.$getfilename(lFilePath)
Set import file name {[lFilePath]} ;; #F
Prepare for import from file {Delimited (tabs)} Import data ImportList End
import Close import file End If
Prompt for import file
If flag true
Prepare for import from file {Delimited (tabs)} Import data ImportList End
import Close import file End If
Hope this helps.
Regards
Rudolf Bargholz
—–Ursprüngliche Nachricht—–
Von: omnisdev-en [mailto:omnisdev-en-bounces@lists.omnis-dev.com] Im Auftrag
von Wendy
Gesendet: Dienstag, 22. August 2017 12:46
An: ‘OmnisDev List – English’ <omnisdev-en@lists.omnis-dev.com>
Betreff: Studio 4 Import data
Hi
I am hoping someone can help – I am trying to import data from a file
If I do the following
Prompt for import file
Prepare for Import from file – delimited tabs Import data into a defined
list
It works fine
If I do the following
Set import file path with the path of the import file Prepare for Import
from file – delimited tabs Import data into a list
It manages to import the wrong information
I have checked the path is correct
HELP
Many thanks
Wendy Osbaldestin
Wizard Computer Services
Tel: 01260271647
Mobile: 07740541021
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com
_____________________________________________________________
Manage your list subscriptions at lists.omnis-dev.com