Lantica Software Support Center
Lantica Software Home Page
Order Sesame Getting Started Support Center Contact Us Company Downloads Q&A ™  
Search

Knowledgebase Home

Post a Value From a Parent Form to a Subform

Use the SBasic command FormFieldValue() (See the Sesame Programming Guide for more information on this, and other SBasic commands). In the context of a parent form with a subform that has multiple records, here is a loop from a parent to the subform records:

// This syncs the SOLines!SODate and SOLines!SONum with Orders!SODate and Orders!SONum
// in case the SODate is moved into the future during the building process, or 
// SONum is inadvertently changed during the middle of the building process

vCnt1 = @FormResultTotal("SOLines")

vLoop1 = 1
While vLoop1 <= vCnt1

	{
		FormFieldValue("SOLines", "SODate", vLoop1, vSODate)
		FormFieldValue("SOLines", "SONum", vLoop1, vSONum)
FormFieldValue("SOLines", "ClientID", vLoop1, vClientID)
FormFieldValue("SOLines", "ShipToID", vLoop1, vShipToID)
FormFieldValue("SOLines", "ShipToClientID", vLoop1, vShipToClientID)
FormFieldvalue("SOLines", "ClientName", vLoop1, vShipToName)
If vDNI = "Y"
{
	vDNIinv = "E"
	FormFieldValue("SOLines", "Invd", vLoop1, vDNIinv)
	FormFieldValue("SOLines", "BO", vLoop1, vDNIinv)
}

vLoop1 += 1
	}

Properties ID: 000230   Views: 2193   Updated: 13 years ago
Filed under:
Programming
Working With Your Data / Records

Copyright Lantica Software, 2003-2025 All rights reserved