I primarily use JavaScript but have a specific need for a table filter expression under a repeater that has to be written in FPL and have no idea if/how to accomplish this.
I have 3 SQL Server tables that I need to incorporate into a repeater.
Server:
---------------
ServerID int (primary key)
ServerName
ServerRoles:
---------------
RoleID int (primary key)
RoleName
ServerRoleAuthorizations:
-----------------------------
ServerID
RoleID
I want to display this information in this form using a repeater:
Server Roles (repeater)
Servers (Only servers that have this role)
As you can see, the Servers table does not have a Role column. The association between a server and role is done in ServerRoleAuthorizations which is an intermediary table.
I want to write a filter expression that would link the Server table with that role.
How can this be done ?
FPL Syntax
Moderators: Jon, Steve, Ian, Dave
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
You need two ebase tables:
ROLES: linked to your ServerRoles DB table
columns: RoleId, RoleName
SERVERS: a join of your Server and ServerRoleAuthorizations table (joined by serverId)
columns: serverId, serverName, roleId
Add a Repeater linked to the ROLES table.
Within this add a second Repeater or Table control linked to SERVERS, in the filter expression enter: SERVERS-ROLEID=ROLES-ROLEID
Call fetchTable() on both tables.
ROLES: linked to your ServerRoles DB table
columns: RoleId, RoleName
SERVERS: a join of your Server and ServerRoleAuthorizations table (joined by serverId)
columns: serverId, serverName, roleId
Add a Repeater linked to the ROLES table.
Within this add a second Repeater or Table control linked to SERVERS, in the filter expression enter: SERVERS-ROLEID=ROLES-ROLEID
Call fetchTable() on both tables.
0 x
Who is online
Users browsing this forum: No registered users and 29 guests