Choose Language Hide Translation Bar
Highlighted
emdwright
Level II

How to recode a column with a formula in JSL

I feel like I might be clost, I just want to use JSL to fill a blank column with the name of the file I read in.  The file does have a variable (dtPullName), but I would be happy too if I could just assign it a string:

 

dtT2 << New Column( "Quarter", Data Type(Character),Modeling Type(Nominal) );
dtT2 << select where (:Quarter);
Current Data Table() << Begin Data Update;
col = Column( 7 );
col << For Each Row( :Quarter = Match( :Quarter, "", "17_Q4", :Quarter ) );
Current Data Table() << End Data Update;

 

So far it just comes up blank

 

thank you for the help!

 

EW

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: How to recode a column with a formula in JSL

dtT2 << New Column( "Quarter", Data Type( Character ), Modeling Type( Nominal ) );
dtT2:Quarter << Set Each Value( "file name" );
Learn it once, use it forever!

View solution in original post

2 REPLIES 2
Highlighted

Re: How to recode a column with a formula in JSL

dtT2 << New Column( "Quarter", Data Type( Character ), Modeling Type( Nominal ) );
dtT2:Quarter << Set Each Value( "file name" );
Learn it once, use it forever!

View solution in original post

Highlighted
emdwright
Level II

Re: How to recode a column with a formula in JSL

Thank you so much!  The finishing touch on my first JSL :)

Article Labels

    There are no labels assigned to this post.