Examples of referring to values on data access pages

Examples of referring to values on data access pages

The following table lists examples of expressions that you can use in calculated controls on data access pages.

If you use this expression The page displays
=Document.All("MSODSC").CurrentSection.ChildSection.HTMLContainer.Children("ProductID") The value in the ProductID control in the section that is one group level below the current section.
=Document.All("MSODSC").CurrentSection.ParentSection.HTMLContainer.Children("CustomerID") The value in the CustomerID control in the section that is one group level above the current section.
=Document.All("MSODSC").CurrentSection.Parent.Parent.HTMLContainer.Children("Country") The value in the Country control in the section that is two group levels above the current section.
=Document.All("MySpreadsheet").Range("A1") The values in the range A1 in the spreadsheet control.

The following table lists examples of referring to controls on a page from a spreadsheet control.

If you use this expression The page displays
=document.Quantity.value*document.UnitPrice.value The result of multiplying the value in the Quantity control by the value in the UnitPrice control.
=$C$1*document.UnitPrice.value The result of multiplying the value in the UnitPrice control by a percentage rate that is stored in spreadsheet cell C1.