cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing a specific cell of a table without a model via script in SAC

FxGk
Participant
0 Kudos

Hey,

it is possible to create a table without a model and to enter numbers and text manually. So far so good. You can even use formulas like in Excel and the result will be displayed.

Just a test:

But i cant find any way to access the cells or to manipulate the values of this table by using a script. And because there is no data source for this table i cant use Table_1.getDataSource().

Does anyone have an idea?

Best regards

Felix

Edit:

You can even reference to a specific cell like in Excel:

Now i wonder if and how i can use scriptvariables in this table calculation?

Accepted Solutions (1)

Accepted Solutions (1)

N1kh1l
Active Contributor

fx.gk

I think that's a grid page ? Unfortunately scripting does not work on that page at all. Or if its table without a model then again scripting wont work without a data source binding.

Br

Nikhil

FxGk
Participant
0 Kudos

It is a table without a model

What a shame i cant use scripting here 😄

I cant use script variables either?

Thanks for the fast response.

Answers (1)

Answers (1)

eeddggaarr
Contributor

Hi Felix,
a workaround if you only need a few table fields:

  • use the table to create needed structure
  • put input or text fields into the table cells
  • now you can use scripting with values retrieved from input fields (var userInput1 = InputField1.getValue();) create a new variable with your calculation (var result = userInput1 + userInput2;) and display them in text fields (Text_1.applyText(result.toString());

br
edgar

FxGk
Participant
0 Kudos

Hi edgar,

I tryed this first but it seems like you cant put input fields into a table cell. The only option i found is to overlay the table with an input field. But this is a very dirty solution.

eeddggaarr
Contributor
0 Kudos

Hi Felix,
'put xyz into the tabel cells' was poorly worded => I meant on top of the table cells. And I agree: this is not a very efficient solution.
another idea: you could try integrated R environment to create a table more suited to your needs. This should allow you to use variables and calculations.

br
edgar