Hello, I'm trying to create an application that allows my user to create JSON rules. The aim is to offer a front-end on JSON and not to use the json editor because it's not relevant if you're not familiar with it.
JSON has a simple structure and the first fields are easily filled with basic inputs. However, in the criteria section, I want the user to be able to add 5, 10 or 20 (the number he wants) objects to the array.
I'm trying to do this with a listView and allow an infinite number of new objects to be added to the array and add to it with a + button. The list value I use is based on a global variable.
If you have any idea please share Thank you. Antoine
{
"ruleName": "FDR_TAIL_INCONSISTENT_WITH_AOC_AND_OFP_TAILS",
"ruleDescription": "FDR tail differs from AOC and OFP",
"dataIntegrationStep": "ASSOCIATION",
"enabled": true,
"dataTypes": ["AOC", "FDR", "OFP"],
"dimensions": ["CONSISTENCY"],
"groups": ["Data_Association"],
"ruleDefinition": {
"ruleType": "CUSTOM",
"context": {
"logicalOperator": "AND",
"criteria": [ --Here create the number of objects jhe wants
{
"firstField" : "AOC_AIRCRAFT_REGISTRATION",
"operator" : "EQ" ,
"secondField": "OFP_AIRCRAFT_REGISTRATION"
},
{
"firstField" : "FDR_AIRCRAFT_REGISTRATION",
"operator" : "NE" ,
"secondField": "AOC_AIRCRAFT_REGISTRATION"
},
{
"firstField": "AOC_AIRCRAFT_REGISTRATION",
"operator" : "IS_NOT_NULL"
},
{
"firstField": "OFP_AIRCRAFT_REGISTRATION",
"operator" : "IS_NOT_NULL"
},
{
"firstField": "FDR_AIRCRAFT_REGISTRATION",
"operator" : "IS_NOT_NULL"
}
]
}
}
}