cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

script line by date

hcarr01
Level VI

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 .

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User


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 ) );
Jim

View solution in original post

5 REPLIES 5
jthi
Super User


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.

-Jarmo
hcarr01
Level VI

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 .

jthi
Super User


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)

-Jarmo
Jeff_Perkinson
Community Manager Community Manager


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?

-Jeff
txnelson
Super User


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 ) );
Jim