script line by dateHello 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 !
Automation and ScriptingRe: script ligne par dateUsing 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.
Re: script line by dateYes 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!
Re: script ligne par dateWhat 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?
Re: script ligne par dateYou 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="https://community.jmp.com/">" );
// Ajouter les nouvelles données à la table principale
dt << concatenate( dtAujourdhui, Append to first table( 1 ) );</THE></YOUR>
Re: script ligne par dateMaybe you have to schedule it with some sort of task scheduler? (I don't know with the information you have provided)