cancel
Showing results for 
Search instead for 
Did you mean: 

how to use of pov member in C# api.data.calc

pranav46
Contributor

Hi,

I am trying to build C# finance BR where scenario is being pulled from POV but how to use in api.data.calculate function. If its VB then I can use with & but C# its not working.

2 ACCEPTED SOLUTIONS

FredLucas
Contributor III

A couple of options for string concatenation in C# are using the "+" sign instead of "&" or String.Concat function.

There are a few examples online, here's a sample:

string firstName = "John ";
string lastName = "Doe";

//one option:
string name = firstName + lastName;

//another option:
string name = string.Concat(firstName, lastName);

 

 

View solution in original post

Have you try doing:

api.Data.ClearCalculateData("S#" + curScenario + ":O#Forms:V#Periodic",....)

Hope this helps.

View solution in original post

5 REPLIES 5

Henning
Valued Contributor

Hi, if you do not mind posting your code here (both versions, your VB one and the C# attempt), then the community might be able to have a look at it and give you tips on how to correct it. 

Here you go.

this is C# and VP you could use " & member & " to get value which is defined as parameter.

pranav46_0-1720715897693.png

 

Have you try doing:

api.Data.ClearCalculateData("S#" + curScenario + ":O#Forms:V#Periodic",....)

Hope this helps.

It worked. Thanks a lot Fred!

 

FredLucas
Contributor III

A couple of options for string concatenation in C# are using the "+" sign instead of "&" or String.Concat function.

There are a few examples online, here's a sample:

string firstName = "John ";
string lastName = "Doe";

//one option:
string name = firstName + lastName;

//another option:
string name = string.Concat(firstName, lastName);