Skip to main content
Forum
Privacy
Contact
How to enable Javascript
Sign Up
Log in
Welcome to the Ninox community
Search all topics or
ask a question
Learn and share
Get help
Service status
Documentation
Solutions
Setup
Databases
Automation
My account
Administration
Webinars
Overview
Profile
Sotirios Zormpas
szormpas
Greece
523
203
2
Joined: Sun Nov 07 22:33:30 UTC 2021
Follow
My Posts
Latest Posts
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel please mark the post as answered.
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel well done!
Sotirios Zormpas
szormpas
2 mths ago
1
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel just go to your online account and click on 'import archive'.
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel Could you please use the updated version of the database I uploaded above? I think it's easier since there's no real data yet.
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel copy-paste the following script: do as server let allContacts := (select Contacts); let allEvents := (select Events); let allRSVP := (select RSVP);…
Sotirios Zormpas
szormpas
2 mths ago
1
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel We made it! The issue in your database came up because the 'Event ID' field in the StagingImport table was set to number data type. So, I changed it to a text field type.…
Attachment
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel We should use the same logic in the Contacts table. If a new contact attends multiple events in the .csv file, only one new record should be created in the Contacts Table.…
Attachment
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel@Fred@RoSoft_Steven I think we're getting there. The issue came up because the 'select' statement returns 'nid', but the 'create' statement returns 'rid'. Here's a script you can try out.…
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel Hi, I forgot to put the "w" variable in brackets []. Here's the updated script, let's hope it works! do as server let x := select Contacts; let y := select Events; let z := select RSVP;…
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel Can you make a last effort to try the following script? do as server let x := select Contacts; let y := select Events; let z := select RSVP; for i in select StagingImport do let c :…
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel Let's try to solve the problem here...
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Sotirios Zormpas can you upload a Demo database and a sample .csv file for testing purposes?
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel the only changes I've made in the previous script were to add two extra lines: y := select Events; delete select StagingImport; Can you use the previous script and gradually add the above…
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel does the field names of the StagingImport Table corresponds to those in the script?
Sotirios Zormpas
szormpas
2 mths ago
1
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel Great... First point: There's a bug in the script. We need to update the "y" variable with the new Event ID so it's recognized in the next iteration. Second point: You got it.…
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel Hi, You can try the following code inside a button. If it works, we can optimize it further. do as server let x := select Contacts; let y := select Events; let z := select RSVP;…
Sotirios Zormpas
szormpas
2 mths ago
Get help
Reported - view
Re: need help on importing a .csv into two related tables (scripting help?)
@Dave Airel Hi, You might find the following post interesting. https://forum.ninox.com/t/x2yk889/is-it-possible-to-use-function-parsecsv-directly-in-server-mode
Sotirios Zormpas
szormpas
2 mths ago
1
Get help
Reported - view
Re: Mehrfachauswahlfelder mergen
@alex Hi, I'm happy I could help you figure it out! Cheers
Sotirios Zormpas
szormpas
3 mths ago
Get help
Reported - view
Re: Mehrfachauswahlfelder mergen
@alex Hi, I'm not sure if you really need the "if... then... else" statement in the above logic. Can you try it without the Statement and see if that works?
Sotirios Zormpas
szormpas
3 mths ago
1
Get help
Reported - view
Re: Mehrfachauswahlfelder mergen
Hi@alex , One option is to try the unique() function. Here's an example of what I mean: let x := PreviousRecord.'Multiple choice'; 'Multiple choice' := unique(numbers('Multiple choice'), numbers(x))
Sotirios Zormpas
szormpas
3 mths ago
1
Get help
Reported - view
Re: v3.15.8 is out
Hi @Fred , I am still on 3.15.4
Sotirios Zormpas
szormpas
3 mths ago
Learn and share
Reported - view
Re: Dashboard Template
@Phil Hi, I'm so glad you're enjoying the project I'm working on in my spare time. I'm exploring the possibilities of the Ninox platform and sharing ideas to inspire other users.…
Sotirios Zormpas
szormpas
3 mths ago
Learn and share
Reported - view
Re: Is It Possible to use Function "parseCSV" directly in Server Mode?
@Javier Gómez Hi, No worries! I didn't take your post as criticism at all. I just wanted to let you know that the above solution worked for me. The above steps enable you to automate the entire…
Sotirios Zormpas
szormpas
3 mths ago
Get help
Reported - view
Re: Is It Possible to use Function "parseCSV" directly in Server Mode?
@Javier Gómez Hi, it works. I can import thousands of records in seconds!
Sotirios Zormpas
szormpas
3 mths ago
1
Get help
Reported - view
Re: Is It Possible to use Function "parseCSV" directly in Server Mode?
Hi @Nousmedis info , You can run your code in a "do as server" context to speed up a custom import of a CSV file. In my database, I've got an image field called "CSV File" where you can upload the…
Sotirios Zormpas
szormpas
3 mths ago
2
Get help
Reported - view
1
2
3
4
5
21
Ninox-Website
Overview
Learn and share
Get help
Service status
Documentation
Solutions
Ninox E-Invoice
Setup
Installed apps
Public Cloud
Private Cloud
On-Premises
Databases
Tables
Table relationships
Fields and elements
Pages
Views
Import and export
Modules
Printing
Templates
Use cases
Automation
Performance
Scripting
Functions
API
My account
Subscriptions
Administration
Manage workspaces
Manage collaborators
Access permissions
Usage overview
Process monitor
View all topics