How to start a rule input with data?

Certified Associate Developer

Hi team,

im looking a way to start a rule input with data, for example: i get data in a child sail that i need to pass in a parent sail at the first moment the parent sail calls to child

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    For an interface, when viewing it via the Interface Designer, you simply hit "test", enter your testing values, press "save as default".

    For child interfaces or expression rules - if you're calling them from a parent interface, you can pass in the appropriate data as rule inputs, or you can hardcode some values if you really want - it all depends on the particular details of what you're trying to do.  If you want much more specific answers though you'll need to tell us more about where you're looking, what you're trying to accomplish, and what issue(s) you're having with accomplishing it.

  • 0
    Certified Associate Developer

    Hi Almanava,

    you should be saving the values in a rule input in child interface and pass that to main interface using ri!.

    Are you looking for sample code?

  • 0
    Certified Senior Developer

    I am here totally with mike that more informationen would be helpful, but for the most common cases I had in mind where the following two:

    1) within interfaces

    a!localveriables(
      local!variable1: "teststring",
      ....
      rule!EXA_SC_ChildInterface(exampleRuleInput: local!variable1)
    
    )


    2) as start process form - you set the value for process variables as parameter 
    (in this case "false" for the process variable "isCancel") 

  • 0
    Certified Senior Developer

    Not sure if your question has the right information to provide an accurate answer. But from what I understand, it would some specific identifier unless until you want to show all your data(Would be pre-loaded/fetched in the child interface). 

    1. Have a local variable in the child interface which would use a expression rule to get/query the data either using a identifier or some specific filter value which would be a rule input and then use this local variable/data across the interface.

    2. Call the child interface rule in the parent interface and in the parameters pass the identifier or the input value of your child interface which will be showing you data.

    this cannot work the other way around to save the data unless you pass the whole data using a rule input on save from the child interface.

  • 0
    Certified Associate Developer
    in reply to Konduru Chaitanya

    Hi, what im really trying to do is get the data from de child interface, in the parent interface i have a foreach to show the same child interface per item but with different data because the data showed depends on the info in the item given, so this is working well, but i need to get the data from each interface and append all of them in the parent interface in a local variable, and i tried to pass a ri in the child interface but when i tried to append this ri it doesn't work, the local just recover the data of the interface that im selecting in that moment. if you need to see the code i could share the interfaces :) thank you for your response

  • 0
    Certified Associate Developer
    in reply to Richard Michaelis

    Hi, what im really trying to do is get the data from de child interface, in the parent interface i have a foreach to show the same child interface per item but with different data because the data showed depends on the info in the item given, so this is working well, but i need to get the data from each interface and append all of them in the parent interface in a local variable, and i tried to pass a ri in the child interface but when i tried to append this ri it doesn't work, the local just recover the data of the interface that im selecting in that moment. if you need to see the code i could share the interfaces :) thank you for your response

  • 0
    Certified Associate Developer
    in reply to karthikkanjerla

    Hi, i think is more complex, what im really trying to do is get the data from de child interface, in the parent interface i have a foreach to show the same child interface per item but with different data because the data showed depends on the info in the item given, so this is working well, but i need to get the data from each interface and append all of them in the parent interface in a local variable, and i tried to pass a ri in the child interface but when i tried to append this ri it doesn't work, the local just recover the data of the interface that im selecting in that moment.

  • 0
    Certified Associate Developer
    in reply to Mike Schmitt

    thank you Mike, and yes i need more specific answers, this is the scenario: what im really trying to do is get the data from de child interface, in the parent interface i have a foreach to show the same child interface per item but with different data because the data showed depends on the info in the item given, so this is working well, but i need to get the data from each interface and append all of them in the parent interface in a local variable, and i tried to pass a ri in the child interface but when i tried to append this ri it doesn't work, the local just recover the data of the interface that im selecting in that moment. if you need to see the code i could share the interfaces :) 

  • 0
    Certified Lead Developer
    in reply to almamnava
    what im really trying to do is get the data from de child interface, in the parent interface

    Generally speaking this is not how the data flow from child to parent interfaces works.  Usually you would get the data in the parent interface and pass it into the child interface.

    If you can share your interface code (please be sure to use a code box) as well as a description / screenshots of what's currently happening, versus what you need to happen given the data in question, it might help us get some more specific answers in place for you.

  • 0
    Certified Senior Developer
    in reply to almamnava

    I would say share the code snippet of what you have and what you are getting from that now and how you want it (additional to what you have achieved)