I may be thinking about this the wrong way... but I have 2 different UIs built using UiApp;
Part 1: the "Project Index UI" which holds a list of all approved/pending projects.
- I have unique IDs for each project, with a row of information in another Spreadsheet that correlates to each ID.
Example: Project ID 20857 really points to row 4 in "Project Spreadsheet".
Part 2: the "Project Details UI" which is essentially an interface for editing the values in the Spreadsheet and updating calendar events with the new information.
The goal is to give my boss an index of all projects that are currently in the system. Then, as he wants, he can click on a project ID to load another UI that presents the information for that ID.
So: I was thinking about having the Project Name as an anchor, where the ID is embedded such as:
var anchor = app.createAnchor("Some Project", "https://sites.google.com/site/mySite/asdf&ID=20857");
Where asdf
is the page where the "Project Details UI" is located. Then I would parse the URL to get the ID, and load the information into the Project Details UI that way.
What I'm thinking is that this is way too complicated, and that there is an easier way to accomplish this but I'm just not sure.
Is there a better method for generating a new UI with specific data obtained through a "link" of some sort in the original UI?
Solution: TabPanel with 2 tabs - each ID acts as a reference to a row of information in a Spreadsheet. When a button is clicked, a serverHandler
invokes a function with that ID as a parameter, which fills the second tab with information for that ID.
Below are two illustrations of the UIs and how they should function: