Forum Discussion
Rob
4 years agoNew Contributor
Clear data on Origin Forms
Does anyone have a piece of code to clear data on the origin Forms member for just a few accounts? The api.data.clearcalculateddata is not possible (data is not calculated) and api.data.setdatacell d...
- 4 years ago
You can combine calculate with clearcalculateddate like this:
Dim script as string = pov api.data.calculate($"{script} = 0 * {script}") api.data.clearcalculateddata(script)The first row will make it calculated, the second row will delete it, because now it is calculated.
ChristianW
OneStream Employee
4 years agoYou can combine calculate with clearcalculateddate like this:
Dim script as string = pov
api.data.calculate($"{script} = 0 * {script}")
api.data.clearcalculateddata(script)The first row will make it calculated, the second row will delete it, because now it is calculated.
Krishna
4 years agoValued Contributor
The below code will also work.
Dim Parent As Member = api.Members.GetMember(DimType.Account.Id,"IS")
Dim ActMembers As List (Of Member) = api.members.GetBaseMembers( _
api.Pov.AccountDim.DimPk, Parent.MemberId, Nothing)
If Not ActMembers Is Nothing Then
For Each ActMember As Member In ActMembers
If ((Not api.Entity.HasChildren()) ) Then
api.Data.ClearCalculatedData("A#" & ActMember.Name,True,True,True,True)
End If
Next
End IfRelated Content
- 3 years ago
- 2 years ago
- 2 years ago