uodated queries to sort deep recursion

This commit is contained in:
2025-04-16 08:44:45 +01:00
parent 420501dbf1
commit d882e65071
54 changed files with 270 additions and 267 deletions
+8 -8
View File
@@ -18,7 +18,7 @@ import xpath from "xpath";
*/
export const getFormCollection = (formtype) => {
const collectionName = jsonpath({
path: "$..[?(@.LogicalName=='" + formtype + "')]",
path: "$..[?(@ && @.LogicalName=='" + formtype + "')]",
json: data,
eval: true,
});
@@ -27,7 +27,7 @@ export const getFormCollection = (formtype) => {
export const getFormCollectionByID = (appealTypeID) => {
const collectionName = jsonpath({
path: "$..[?(@.appealTypeID =='" + appealTypeID + "')]",
path: "$..[?(@ && @.appealTypeID =='" + appealTypeID + "')]",
json: data,
eval: true,
});
@@ -36,7 +36,7 @@ export const getFormCollectionByID = (appealTypeID) => {
export const getFormIDByLogicalName = (appealTypeLogicalName) => {
const collectionName = jsonpath({
path: "$..[?(@.LogicalName =='" + appealTypeLogicalName + "')]",
path: "$..[?(@ && @.LogicalName =='" + appealTypeLogicalName + "')]",
json: data,
eval: true,
});
@@ -45,14 +45,14 @@ export const getFormIDByLogicalName = (appealTypeLogicalName) => {
export const getPickListLabel = (data, picklistType, picklistID) => {
const pickListData = jsonpath({
path: "$..[?(@.LogicalName=='" + picklistType + "')]",
path: "$..[?(@ && @.LogicalName=='" + picklistType + "')]",
json: data,
eval: true,
});
const pickListLabel = jsonpath({
path:
"$..[?(@.Value=='" +
"$..[?(@ && @.Value=='" +
picklistID +
"')].Label.LocalizedLabels..Label",
@@ -64,14 +64,14 @@ export const getPickListLabel = (data, picklistType, picklistID) => {
export const getRadioLabel = (data, radiotListName, radioListID) => {
const radioListData = jsonpath({
path: "$..[?(@.LogicalName=='" + radiotListName + "')]",
path: "$..[?(@ && @.LogicalName=='" + radiotListName + "')]",
json: data,
eval: true,
});
const pickListLabel = jsonpath({
path:
"$..[?(@.Value=='" +
"$..[?(@ && @.Value=='" +
radioListID +
"')].Label.LocalizedLabels..Label",
@@ -336,7 +336,7 @@ export const getProgressObj = (
const isRequiredField = jsonpath({
path:
"$..value[?(@.LogicalName=='" +
"$..value[?(@ && @.LogicalName=='" +
datafieldname[0].value +
"')]",
json: mandatoryFieldsData,