Top > Frequently Asked Questions > Can I use the embedded view?

Frequently Asked Questions

Print Prev Next

Can I use the embedded view?

2018/1/9 Created.
2019/9/17 Updated.

You can't automatically include the embedded view itself like a field, but you can write a formula to make it look like an embedded view.
The following is an example.

The original embedded view "vwEmbCstByOrg" has the following 5 columns, displayed as a single category with values in the "Organization Name (OrgName)" field.

Column titleOrganization name
Furigana
Person name
DivisionPost
Column value (Field/Formula)OrgNameCstKana
CstName
CstDiv
CstPost
Description
By Category/Ascending
for Japanese name
Ascending



When viewed in Notes, it looks like the following image.
Notes サンプルイメージ


Add a hidden column to the "vwEmbCstByOrg" view with the following formula that shows the Universal ID of each person document.
@Text( @DocumentUniqueID )

Open the appropriate App Configuration document and insert a field row in the "Displayed Field" of the Form Info, or in an empty field row, set any label name (e.g. Person List) and set the following formula in the "Formula".
REM {key value for getting values from "vwEmbCstByOrg" view};
key := OrgName;
REM {Document ID of App Configuration document of "Customer Relationship Management" App};
tmp1 := "D4CAE3489395EC6F492581C2002EAEC3";
REM {Get column values from "vwEmbCstByOrg" view};
tmp3 := @DbLookup( "":""; "demo01":"sample\\customer.nsf"; "vwEmbCstByOrg"; key; 3; [FailSilent] );
tmp4 := @DbLookup( "":""; "demo01":"sample\\customer.nsf"; "vwEmbCstByOrg"; key; 4; [FailSilent] );
tmp5 := @DbLookup( "":""; "demo01":"sample\\customer.nsf"; "vwEmbCstByOrg"; key; 5; [FailSilent] );
tmp6 := @DbLookup( "":""; "demo01":"sample\\customer.nsf"; "vwEmbCstByOrg"; key; 6; [FailSilent] );
REM {Generate HTML code};
"<table border='1'><tr><th>Name</th><th>Division</th><th>Post</th></tr>" + @Implode( "<tr><td style='font-size: 14px;'><a href='/sdcnctr.nsf/fmMobileForm?OpenForm&ParentUNID=" + tmp1 + "&UID=" + tmp6 + "&NID=&f=' target='_blank'>" + tmp3 + "</a></td><td style='font-size: 14px;'>" + tmp4 + "</td><td style='font-size: 14px;'>" + tmp5 + "</td></tr>" ) + "</table>"


When displayed in smaconne, it looks like the following image.
FAQ94 smaconne イメージ


Print Prev Next












© 2024 BestCommunications, Inc.