cancel
Showing results for 
Search instead for 
Did you mean: 

BRFplus ( table input / change / table output )

Former Member
0 Kudos

Hi Experts,

I want to import a table as context, cange one field and then output it.

What is your recommendation for the best solution ?

Do i need 2 tables ( same structure ) ; one for context , one for result ?

How do i change to field in the best way ??

Thank you for your help !

Accepted Solutions (1)

Accepted Solutions (1)

carsten_ziegler
Active Contributor
0 Kudos

Add table to context (not result).

Hand over data.

In BRFplus maybe loop the table and do your changes.

After BRFplus execution read your table from the context.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello Guys,

the problem is solved.

After the first rule in the loop expression where i do the decision table and cange the context field's value, you have to initialize the ruleset-variable in the next 'loop rule'. Ohterwise it won't work.

Thank's

Former Member
0 Kudos

I should have added these lines:

I have added some rows and filled the fields during the simulaiton !

But nevertheless it stops with this message!

Former Member
0 Kudos

Hello Carsten,

now its all clear. All Objects are active and consistent.

Last Steps:

I did now a function in eventmode.

I assigned a ruleset to this function.

My first rule is " Change TABLE afterprocessing LOOP ".

In LOOP-Expression:

first rule "Change RULESET-VARIABLE" after processing Decision Table

In this decision table there is one field is one condition-field ( the field i want to change ) and a copie of this field as result (RULESET-VARIABLE).

second rule "Change value of CONTEXT-FIELD from value of RULESET-VARIABLE

Now i did a Simulation of this function, but it stops with this message:

Access via 'NULL' object reference not possible.

What could have raised this ?

Former Member
0 Kudos

Sorry Carsten, i'm a beginer in this context.

I did now a function in eventmode.

I assigned a ruleset to this function.

My first rule is " Change TABLE afterprocessing LOOP ".

In LOOP-Expression:

first rule "Change no available context" after processing Decision Table

In this decision table there is one field is one condition-field ( the field i want to change ) and a copie of this field as result.

second rule "Change value of context-field to [...]"

Here i can't select the field which i filled in the decision table.

Need Help- 😃

carsten_ziegler
Active Contributor
0 Kudos

You need to make the additionally used field a ruleset variable.

Former Member
0 Kudos

Hello Carsten,

now i did exactly what you said.

I have a function in event mode, a ruleset assigned to this function, one rule in this ruleset. This is my LOOP-Expression and in the loop expression, i have only one rule( first i do the decision table -result is a ruleset variable- and then i change the field in the table with the value from ruleset-variable).

But during the simulation this message come again and again: Acces via 'NULL' object reference not possible

What's wrong ?

Former Member
0 Kudos

I understood the way you want to solve it, but how shall i change the context?

I want to do it by a decision table, but i can't define the same field as "context and result" !

Do you know a better way ?

carsten_ziegler
Active Contributor
0 Kudos

Inside of the loop use the table fields as input for the decision table.

As a result you use a ruleset variable.

In a rule where the decision table is called you take back the result and map it to the field in the table.