별도의 추가 개발없이 검색조건을 쿼리에서 가져와 제공합니다.

레이블 추가하기

가져오는 쿼리에 value, label 을 참고합니다.

- path: properties/active
  blocks:
  - type: query
    resource: mysql.qa
    sqlType: select
    sql: >
      SELECT * 
      FROM properties 
      WHERE (LENGTH(:type) = 0 OR `type` = :type)
      ORDER BY id ASC 
      LIMIT 100
    params:
    - key: type
      label: 분류코드
      datalist: true
      datalistFromQuery: 
        type: query
        resource: mysql.qa
        ***sql: > 
          SELECT 
            code AS 'value', name AS 'label' 
          FROM category_code***

Screen Shot 2022-04-01 at 6.37.38 PM.png

Screen Shot 2022-04-01 at 6.37.43 PM.png

Dropdown 으로 표시

- path: properties/active
  blocks:
  - type: query
    resource: mysql.qa
    sqlType: select
    sql: >
      SELECT * 
      FROM properties 
      WHERE (LENGTH(:type) = 0 OR `type` = :type)
      ORDER BY id ASC 
      LIMIT 100
    params:
    - key: type
      label: 분류코드
      datalist: true
      datalistDropdown: true
      datalistFromQuery: 
        type: query
        resource: mysql.qa
        sql: > 
          SELECT 
            code AS 'value', name AS 'label' 
          FROM category_code

Screen Shot 2022-04-01 at 6.44.24 PM.png

https://embed.notionlytics.com/wt/ZXlKd1lXZGxTV1FpT2lJeE56bGpOVE00TmpZMFpqSTBaR1ExT0RBNFlXUXlPR1EwTnpjd1lXUmpPU0lzSW5kdmNtdHpjR0ZqWlZSeVlXTnJaWEpKWkNJNkluTjBTMFZXVUV0aE9FUkRibUY1TkRSUmVGVTJJbjA9