Skip to main content
November 15, 2024
Question

Calling an Child Interface from Parent Interface

  • November 15, 2024
  • 21 replies
  • 0 views

My Child Interface has Submit and Cancel Button. It has File Upload functionality. Below are the 2 Rule Inputs it has:

  • Cancel Rule Input (Type Boolean)
  • excelData Rule Input (Type Document)

I have a Parent Interface which uses Navigation, in one of the Navigation link I need to have this Child Interface appear. I was using rule!Child Interface, but its asking me to pass 2 parameters. Can you please help me on how I can pass those 2 parameters from Parent Interface?

Regards,

Mahesh

    21 replies

    November 15, 2024


    [mention:f715d2a5beee447f95815c5be14799c3:e9ed411860ed4f2ba0265705b8793d05]  You need to pass the parameters like this, let me know if you still have any confusion.

    kumara0180
    November 15, 2024

    can you share the parent interface code. I am not sure on what do you mean by navigation link 

    November 15, 2024

    If your parent interface is being used in a process model as either Start Form/User Input task and you need those two rule input data to be passed to the PM from child interface, then create two new rule inputs in the parent interface and map them to the child rule wherever you are calling in the parent. 

    If that's not the case, then you can create two new local variables in the parent interface and pass them as parameters where you are calling the child.

    Approach may change based on how you want to utilize the data in those rule inputs

    November 18, 2024

    Hi Aditya,

    I have created 2 local variables on the parent stand-alone interface. I called the child interface by passing those 2 parameters. When I am testing the Site, the Submit/Cancel buttons are doing nothing. Below is how I am calling the Child Interface, both the local variables are defined on the parent interface.

    {

    rule!DD_Review_Bulk_Upload_Interface(local!Cancel, local!excelData)

    }

    somasundaram.d
    November 15, 2024

    There are multiple ways of doing it.

    1. If your parent interface needs to get and pass values to process model, then

    a. Create two rule inputs in child interface and pass it to child interface. The data flow will be as below

    process variable >> parent interface rule input >> child interface rule input 

    2. If your parent interface is standalone, then you can use localvariables to initialise the two rule inputs

    local!cancel >> ri!cancel

    local!excelData >> ri!excelData

    November 15, 2024

    gayatria0439
    November 19, 2024

    Hi [mention:f715d2a5beee447f95815c5be14799c3:e9ed411860ed4f2ba0265705b8793d05] ,

    Whenever we call an interface within another interface, we need to pass the necessary parameters to handle actions or transfer values between interfaces. We can use either local variables or rule inputs, depending on the specific requirements. Rule inputs function as global variables and can be managed through the process model. Alternatively, if you need to use the values within the interface itself, you can pass local variables.

    For example:
    rule!Interface(cancel: ri!cancel/local!cancel,fileUpload: ri!fileUpload/local!fileupload)

    gayatria0439
    November 19, 2024

    Regarding interface layouts, we cannot use form layouts when calling an interface within another, as form layouts are top-level layouts and cannot be nested. Instead, we should use section layouts for such scenarios.

    prasantap0900
    November 25, 2024

    Keep the same parameters as rule inputs for parent and pass it to the child