[Arsperl-users] Creating links for Mid-Tier
Brought to you by:
jeffmurphy
|
From: Bowman, B. A <Bow...@st...> - 2006-01-19 22:57:48
|
Hello all,
I have changed the name of this thread from "Finding Out a Form's =
Application name"
I have discovered that I do not need to use the app alias when creating =
a link for Mid-Tier. Here is the link template I use:
http://<MidtierServerName>/arsys/servlet/ViewFormServlet?server=3D<ARSSER=
VERNAME>&formalias=3D<FormAlias>&viewalias=3D<ViewAlias>&eid=3D%22<EntryI=
D>%22
The formAlias can be found with ars_GetSchema. it is prop "60018". i =
can get it with this code:
######################
my $schema =3D ars_GetSchema($c,FormName);
foreach (@{$schema->{"objPropList"}}) {
if ($_->{prop} eq "60018") {
my $FormWebAlias =3D $_->{"value"};
}
}
##################################
To get the view alias, we need to know which view to select. When there =
are multiple views, this could be subjective. But the method I choose =
to use is to select my prefferred view in the admin tool by making it =
the "Default View" under the "Manage Views" dialogue.
The default viwe will have a prop of 161 with a value of 1. Ise the =
following tidbit to find that out:
##################
my @VUIList =3D ars_GetListVUI($c,FormName);
my ($VUI,$v,$defaultView);
foreach $v (@VUIList) {
$VUI =3D ars_GetVUI($c,$RepStruct{$RepID}{"FormName"},$v);
foreach (@{$VUI->{"props"}}) {
if ($_->{"prop"} eq "60019") {
$viewAlias{$v} =3D $_->{"value"};
}
if (($_->{"prop"} eq "161") && ($_->{"value"} eq "1")) {
$defaultView =3D $v;
}
}
}
my $DefaultViewAlias =3D $viewAlias{$defaultView};
##################
And viola! I have both the formalias and the viewalias.
Have fun,
Brent
|