본문으로 건너뛰기

Table의 행과 field 선택하기

용도

table.select(...)는 Report Table 전체 또는 일부 행·field를 Flow input에 연결할 typed source handle로 만듭니다. 화면의 selection 순서나 셀 좌표 대신 Table의 stable key를 저장합니다.

문법

python
table.select(*, rows, fields)

예제

python
selected_cases = load_cases.select(
    rows=["uls_01", "uls_02"],
    fields=["case_key", "permanent_load", "variable_load"],
)

strength.bind(
    "load_cases_input",
    selected_cases,
    to=flow.inputs.cases,
    fields={
        "permanent_load": "permanent_g",
        "variable_load": "variable_q",
    },
    row_key={"source": "case_key", "input": "case_key"},
)

매개변수

이름설명
rows현재는 Table의 declared row_key 값 목록을 명시합니다. px.ALL_ROWS sentinel은 contract_only 계획이며 current SDK에 없습니다.
fieldssource에 포함할 stable field key 목록

반환

reportTableSelection source handle을 반환합니다. 실제 source field와 Flow input field의 대응은 connection.bind(..., fields=..., row_key=...)에서 명시합니다.

규칙

  • row index, A1 좌표, 현재 화면 선택과 column 순서를 저장하지 않습니다.
  • 선택한 row 또는 field가 없어지면 저장과 실행 전에 진단을 반환합니다.
  • 이 선택은 typed Table 값 하나입니다. 행별 Run이 필요하면 explicit Batch를 사용합니다.

다음 단계