Lines From File - How to choose which line?
-
Hello
I am trying to learn BAS better and having problem which i cannot figure out. I have searched the whole forum bit cannot fine solution as "parse from line" is deprecated
example.. i have resource called fruits.csv

In resources
if i use Type -> "LinesFromFile"
it will always take the first line which is Apple, red, sourif i mix lines it will give me random line.
when i "Create List" using {{fruits}} it just gives me first line automatically
What if i want to select Banana line only? so line 3 ( or actually line 2 if using 0 index)
i try specifing line
{{fruits}} :[3] -> String
{{fruits:3}} -> Stringbut this is very wrong
do i have to use special expression?
how can i create "New List" using a specific line from csv/string?
Thank you!
-
https://community.bablosoft.com/topic/7575/how-to-prevent-bas-from-getting-same-data-from-resource
https://community.bablosoft.com/topic/15658/upload-multiple-files-on-one-threat
https://community.bablosoft.com/topic/1244/how-to-get-new-line-from-file-at-the-same-thread
https://community.bablosoft.com/topic/6484/pick-a-random-image-please-help
https://community.bablosoft.com/topic/15083/i-m-struggling-to-understand-notreuse-on-resources
To get particulat line from already defined list you can use
"List" module - "Get element" action. Just enter index number
of line you need inside that "Get element" action. -
@GaG thank you very much for the help.
I was able to do what i wanted much easier using the Excel module.. i had no idea this existed lol
Inside the excel module it has the option to pick from -> to line number which is exactly what i needed.BAS has a ton of cool features i dont even know even existed =)