Bar chart user filter validation

Hi there !

So... I've created a bar chart with some custom fields filters. Now, I'm trying to create a validation for 2 date fields, since they're about date interval and I wanna validate if the second one isn't greater than first one, for example.

I created some validations on field, using "validations" property. It shows error mesage, but still filter chart's data.

Here is the point: I wanna prevent it. Doing a analogy to web development, I wanna prevent the load event.

Is it possible ?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    HI Bruno, If you are querying data based on filters then add the date validation condition  while querying the data as well. i suppose you are querying data in a local variable , if so then add a conditon in the filter parameter based on date validation. below is an basic example ,

    a!localVariables(
      local!data:a!queryEntity(
        entity: cons!entity_emp,
        query: a!query(
          pagingInfo: a!pagingInfo(startIndex: 1,batchSize: -1),
          filter: a!queryFilter(
            field: "id",
            operator: "=",
            value: ri!id,
            applywhen: local!startDate<local!endDate
          )
        )
      )
    )

Reply
  • 0
    Certified Lead Developer

    HI Bruno, If you are querying data based on filters then add the date validation condition  while querying the data as well. i suppose you are querying data in a local variable , if so then add a conditon in the filter parameter based on date validation. below is an basic example ,

    a!localVariables(
      local!data:a!queryEntity(
        entity: cons!entity_emp,
        query: a!query(
          pagingInfo: a!pagingInfo(startIndex: 1,batchSize: -1),
          filter: a!queryFilter(
            field: "id",
            operator: "=",
            value: ri!id,
            applywhen: local!startDate<local!endDate
          )
        )
      )
    )

Children