Dear all, I have an interface which is composed by two sections, each

Dear all,

I have an interface which is composed by two sections, each section being defined in separate interface.
In the interface that contains the first section I have some inputs and a button which computes the rows to be populated in an editable grid placed in the second interface.
My issue is that the rows in the editable grid are updated only the first time the button is clicked, after being populated it behaves like the a!save function is not saving anything.
Does anybody have any idea regarding this?

Thank you in advance!

OriginalPostID-165781

OriginalPostID-165781

  Discussion posts and replies are publicly visible

  • Hi, Can you share the logic for this ? Meanwhile check out the following possible causes...
    1. You must be using variable(s) that act like bridge between these two columns, so to enable rows computation in second column up-on clicking on a button in first column. Are you properly re-computing these variable in side the button's saveInto ?
    2. Have you checked if there is any problem with having your logic inside with block instead of load block vice-versa ?
  • Hi!
    Try calling the interfaces for both the section in with() inside the main interface
  • Use with() in combination with sending the variables in the first section as rule inputs to the second section.. I think this should solve your issue..
  • First of all thank you very much for the very fast answers.

    We need to have multiple sections for the main interface (the one that loads the two sections) and we chose to have them in separate interface for organization reasons since the application is very complex.

    What we have is the following:
    - There is an interface input which is received from the process level. Its CDT contains multiple properties including the inputs from the calculation algorithm and the rows CDT
    - This interface input is sent as rule interface inputs to both interfaces that load the sections.
    - In the first one (the one with the button) the inputs are displayed in textFields and the calculation button executes a a!save function populating the Editable grid property. The calculation works good since it correctly updates the first time is called.
    In this scenario I was expecting to update the second interface Editable Grid, but ... this is the problem...

    I tried before using with() insted of load(), but I get an error like this:
    The save target must be a load() variable, process variable, or node input (or a rule input passed one of those three), but instead was... a local variable

    Many thanks
  • Declare local variables inside with() and use them as values for the second section, if your requirement is just to view the updated values in second section
  • Hi, does the second interface rule(which containing a grid) is called(executed) first time only after the button in first interface rule is clicked ? This is crucial because, for example, in some kinds of with-instead-of-load cases the UI will not seem to be refreshed due to the fact that a with() might cause re-initialization of some variables upon which your grid is dependent on ? Sharing your logic might help me to have better understanding the issue...
  • Or if it's possible write the calculations code in the second interface itself and display your grid accordingly
  • Attached is small POC displaying the dynamic second section based on first section input.

    SampleCode.txt

  • @gouthamk I did a few in depth tests and here is the main behavior:
    1 With the entire form empty, I complete the inputs, I calculate, everything is good. I modify the inputs, I calculate, nothing happens.
    2 If I save the task with the rows computed, and I reenter the task and modify the inputs, the rows are recalculated properly. If I modify again the inputs and recalculate, nothing happens.

    @shrutig978 I am also pretty sure that your suggestion will work, but now becomes a matter of not understanding why is not working like this...

    @neelimaj This becomes very weird. Basically there are four differences between your POC and my code.
    1. I have a load for the main interface
    2. I have a load for the section 2 interface
    3. input1 and items are part of the same CDT (ex: ri!application.intput1 and ri!application.items)
    4. in the a!save() from the Computation Button I don't keep the entire algorithm, but I retrieve it from an expression rule that calls two query rules...

    The rest is the same story...
  • @octavianp, even if you include your above mentioned 4 things, it works..