KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Resetting a sheet in View Pro
PRODUCT: 4D | VERSION: 17 R | PLATFORM: Mac & Win
Published On: April 4, 2019

Here is a utility method to reset the current sheet in View Pro:

//---------------------------------------------------------------------------------
// Name: RESET_SHEET_VIEWPRO
// Description: Method will clear and reset current sheet in View Pro.
//
// Parameters:
// $1 (POINTER) - View Pro object
// --------------------------------------------------------------------------------
C_POINTER($1;$vProObj)
C_TEXT($jsCode_t;$res_t)

If (Count parameters=1)
  $vProObj:=$1
  
  $jsCode_t:="spread.getActiveSheet().reset();"
  $res_t:=WA Evaluate JavaScript($vProObj->;$jsCode_t)
End if


Here is a sheet that contains data:




Using the following example will clear the current sheet. Note that this can be any sheet that is the current:

RESET_SHEET_VIEWPRO (->ViewProArea)