I want to hyperlink the ID of the table (ID key) to the field in another page.
So, if i click the ID in the table, I go to another page, where all details of that ID are fetched from the DB.
How can I achieve that?
Tables
Moderators: Jon, Steve, Ian, Dave
-
- Moderator
- Posts: 184
- Joined: Tue Sep 11, 2007 8:58 am
2 steps:
1) Add the table columns to the 'DETAILS' page as normal fields. i.e. just drag the columns and drop them somewhere on the page.
2) The ID hyperlink needs to run a script which says:
1) Add the table columns to the 'DETAILS' page as normal fields. i.e. just drag the columns and drop them somewhere on the page.
2) The ID hyperlink needs to run a script which says:
Code: Select all
form.gotoPage(pages.DETAILS);
// Note: No need to do another fetch
0 x
-
- Ebase User
- Posts: 81
- Joined: Thu Jul 30, 2015 12:44 pm
But, what if I already have the fields? For example, the profile page in Ebase Training Sessions. Suppose I have a table on another page which shows the Users added (So, it's a copy of a Profile Database, connected to Profile table on another page). Now, I've a link ID on the table. All I want is to click to the ID, and the table data (particular row) goes/gets copied to the fields in the Profile page.Hovik wrote:2 steps:
1) Add the table columns to the 'DETAILS' page as normal fields. i.e. just drag the columns and drop them somewhere on the page.
2) The ID hyperlink needs to run a script which says:Code: Select all
form.gotoPage(pages.DETAILS); // Note: No need to do another fetch
Right now all I got is this:
fields.FIELD_NAME.value = tables.TABLE_NAME.COLUMN_NAME.value;
.
.
//for each field on the page.
form.gotoPage(pages.DETAILS);
Can I use something else?
0 x
-
- Moderator
- Posts: 184
- Joined: Tue Sep 11, 2007 8:58 am
In this scenario, you have 2 options:
1) Copy the row values into the field values, as you are already doing.
Uses more code but is the most efficient way.
2) Use a single row DB resource which has a where clause ID=&&ID. Map all resource fields to the fields on the DETAILS page, and do a fetch on this resource.
Less code but you're adding a new resource and mappings to the form. Also another DB access.
In both cases, if you later decide you need more fields on the DETAILS page, you will need do some work.
It's a judgement between which approach gives you the quickest development time and/or needs less resource at run time.
1) Copy the row values into the field values, as you are already doing.
Uses more code but is the most efficient way.
2) Use a single row DB resource which has a where clause ID=&&ID. Map all resource fields to the fields on the DETAILS page, and do a fetch on this resource.
Less code but you're adding a new resource and mappings to the form. Also another DB access.
In both cases, if you later decide you need more fields on the DETAILS page, you will need do some work.
It's a judgement between which approach gives you the quickest development time and/or needs less resource at run time.
0 x
Who is online
Users browsing this forum: Bing [Bot] and 8 guests