Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If condition for checking exist for each field #305

Open
RajGrasko opened this issue Jul 21, 2024 · 0 comments
Open

If condition for checking exist for each field #305

RajGrasko opened this issue Jul 21, 2024 · 0 comments

Comments

@RajGrasko
Copy link

RajGrasko commented Jul 21, 2024

 "#ifgroup(#existsandnotempty($.coordinators))": {
   "coordinators": {
     "#loop($.coordinators)": {
       "#ifgroup(#or(#existsandnotempty($.coordinator_type), #existsandnotempty($.coordinator_id)))": {
         "coordinator_type": "#ifgroup(#existsandnotempty($.coordinator_type)) #valueof($.coordinator_type)",
         "coordinator_id": "#ifgroup(#existsandnotempty($.coordinator_id)) #valueof($.coordinator_id)"
       }
     }
   }
 }
 is this correct for array
 and below one for object
   "#ifgroup(#or(#existsandnotempty($.acuity_info.acuity), #existsandnotempty($.acuity_info.billing_acuity), #existsandnotempty($.acuity_info.transportation_assistance)))": {
    "acuity_info": {
      "#ifgroup(#existsandnotempty($.acuity_info.acuity))": {
        "acuity": "#valueof($.acuity_info.acuity)"
      },
      "#ifgroup(#existsandnotempty($.acuity_info.billing_acuity))": {
        "billing_acuity": "#valueof($.acuity_info.billing_acuity)"
      },
      "#ifgroup(#existsandnotempty($.acuity_info.transportation_assistance))": {
        "transportation_assistance": "#valueof($.acuity_info.transportation_assistance)"
      }
    }
  },
  

and how to remove empty condition, i only want exists condition

also, how to check or condition for if group,?
"#ifgroup(#or(#existsandnotempty($.schedule_settings.ignore_double_booking), #existsandnotempty($.schedule_settings.ignore_deviation)))": { "schedule_settings": { "#ifgroup(#existsandnotempty($.schedule_settings.ignore_double_booking))": { "ignore_double_booking": "#valueof($.schedule_settings.ignore_double_booking)" }, "#ifgroup(#existsandnotempty($.schedule_settings.ignore_deviation))": { "ignore_deviation": "#valueof($.schedule_settings.ignore_deviation)" } } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant