Page 1 of 1

Option List to Populate Tables

Posted: Sun Sep 13, 2009 7:27 pm
by jbruski
Hello,

I'm new to RR, and somewhat to programming altogether. Right now i'm working on a little project just to learn different elements of RR and get used to the program itself altogether. I've run into a problem, and I cannot seem to get a clear solution, or atleast a hint so I can alter my information search. I've been doing a lot of searching lol.

Anyway... I've got a drop down menu with 15 objects listed. I've got a 5x11 table that I want to populate with different information depending on what is selected from the drop down menu. So basically the information is already set what will be in each cell, and the format is set. I know I can import a txt file manually through PI to populate the table.

Is it possible, with the selection of an option, to automatically pull information from a specific .txt file to populate the table? There is probably an easier way to do this, but i've been trying to figure it out on my own. Would it just be easier to create multiple cards; one for each option?

- Accidentally posted this in media had to move it.

Thanks in advanced -

Posted: Sun Sep 13, 2009 7:33 pm
by bn
Hi jbruski,
welcome to the forum.

if as you say your files are properly formatted with tabs then it could be as easy as:

Code: Select all

on menuPick pItemName
   switch pItemName
      case 1
         put url "file:/path/to/Folder/myFile1.txt" into field 1
         break
      case 2
         put url "file:/path/to/Folder/myFile2.txt" into field 1
         break
         -- and so on
   end switch
end menuPick
if you are unshure about the path put this script into a button

Code: Select all

on mouseUp
   answer file "" 
   put it 
end mouseUp
select the file you want and if gives you the path to the text file in the message box.
Keep asking if you get stuck.
regards
Bernd

Posted: Mon Sep 14, 2009 5:36 pm
by jbruski
Thanks bn. It works like I need it to. I will probably come back for more help at some point. I like to try and figure things out by myself first though.