Hello Everybody,
I am trying to create a Dataview which has varying number of fields. Using the DataviewAddDefiinition I can add statically the field Values, their names and their types statically. But in the case, if I am not sure in advance about the fields or say if the number of fields are high then what should be the possible way to do this? I tried the following code, but it doesn’t work. Any response in this regard is most welcome.
DataViewAddDefinition add := new DataViewAddDefinition;
add.dvName := "heatMap8*13";
add.dvDisplayName := "heatMap8*13";
{
integer i :=0;
while(i<matArray.size())
{
add.fieldNames := [i.toString()];
add.fieldTypes := ["integer"];
i := i+1;
}
}
add.keyFields := ["keyField"];
route add;
Here, I am trying to add the fields equal to the number of elements in matArray .
Thanks in advance,
Mohit