My Child Interface has Submit and Cancel Button. It has File Upload functionality. Below are the 2 Rule Inputs it has:
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
Discussion posts and replies are publicly visible
maheshg821223 You need to pass the parameters like this, let me know if you still have any confusion.
can you share the parent interface code. I am not sure on what do you mean by navigation link
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
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
I have added Child Interface and Parent Interface screenshots. Child Interface is a Form that has File Upload, Cancel and Submit Button. It has 2 Rule Inputs Cancel (boolen) and excelData (Document).
Parent Interface has Navigation as shown in the screenshot, My expectation is when user clicks on Bulk Upload, it should show the Child Interface. So in the Parent Interface Bulk Upload Section Layout, I have added rule!Child Interface, when its asking for parameters, I have passed on 2 local variables and I was getting below error message:
The contents field on a column layout cannot contain a form layout. Received a form layout at index 1.
maheshg821223 said:The contents field on a column layout cannot contain a form layout
This error message is pretty self-explanatory. A child interface cannot contain "a!formLayout()", since a!formLayout() cannot be nested at all. You really don't need it though, you can do almost everything you need with a!sectionLayout; the Form Layout component only needs to be used in the top-most form in any case (and even then, it's not 100% required, just makes certain configuration aspects easier for a user input task interface).
Thank you Mike, I have created an interface with section layout instead of Form layout.
Hi Soma,
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)
}
Hi Aditya,