- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
script line by date
Hello everyone,
On a JMP data table, I would like to fill rows with variables that are updated every day.
I study and update with a JSL script the same variables A, B and C every day.
For example today, 02/01/2024 I would like line 1 to be filled with data A, B and C.
On 02/02/2024 I would like line 2 to be filled with the new data A, B and C.
Ect ...until 12/31/2024.
How is it possible to make a script this way?
Power each new day, do +1 on filling the lines.
Thanks for your help !
This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: script ligne par date
You may also want to consider using the Concatenate Platform.
Tables=>Concatenate
It would allow you to take your new line of data and read it into a new JMP table, and the append it to your main table.
dt = Data Table( "<your main table>" );
dtAujourdhui = Open( "<The new data>" );
// Ajouter les nouvelles données à la table principale
dt << concatenate( dtAujourdhui, Append to first table( 1 ) );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: script ligne par date
Using Add Rows is one option
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << Add Rows({name = "David", age = 15});
I prefer usually adding new empty row and then using Data table subscripting to fill in the values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: script line by date
Yes I agree with you, thank you for your response.
Just how can we integrate automatic filling of the next line every day after that into a JSL script?
In the JSL script:
- day 1 filling line 1 with A, B and C
- day 2 filling line 2 with A, B and C
-...
- day 365 filling line 365 with A, B and C
Without the user having to do it every day!
This post originally written in French and has been translated for your convenience. When you reply, it will also be translated back to French .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: script ligne par date
Maybe you have to schedule it with some sort of task scheduler? (I don't know with the information you have provided)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: script ligne par date
What event would you use to trigger the addition of a new row?
If, for example, the event was opening the data table you could add an OnOpen script to add the row to the data table.
Do you have in mind some other event in mind?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: script ligne par date
You may also want to consider using the Concatenate Platform.
Tables=>Concatenate
It would allow you to take your new line of data and read it into a new JMP table, and the append it to your main table.
dt = Data Table( "<your main table>" );
dtAujourdhui = Open( "<The new data>" );
// Ajouter les nouvelles données à la table principale
dt << concatenate( dtAujourdhui, Append to first table( 1 ) );