Jalz Posted September 30, 2014 Posted September 30, 2014 Hi Guys, I'm trying to create a Virtual list, so far it seems to be working great. I populate a global variable called $$MyData and display the results via a VL. Is it possible to to inset a value into line 24 of $MyData using one of the commands or do I have to write a custom function to do this. I've seen there are a couple of custom functions which can extract a line out based on a line number, but Im interested if my $counter says 24, the value goes into line 24 of $$MyData. Many thanks Jalz
eos Posted September 30, 2014 Posted September 30, 2014 but Im interested if my $counter says 24, the value goes into line 24 of $$MyData. The nice thing about Custom Functions is that you can write them yourself, like Let ( [ lineNumber = Int ( GetAsNumber ( lineNumber ) ) ; newLast = ValueCount ( theList ) + 1 ] ; Case ( lineNumber < 1 ; "Only positive integers for the line number, please!" ; lineNumber > newLast ; "Out of bounds error" ; lineNumber = 1 ; List ( newLine ; theList ) ; lineNumber = newLast ; List ( theList ; newLine ) ; Replace ( theList ; Position ( theList ; ¶ ; 1 ; lineNumber - 1 ) ; 0 ; ¶ & newLine ) ) )
Recommended Posts
This topic is 4045 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now