PowerApps - [진행절차-초기] 3. 선택한 직원의 모든 부서 확인
Power Apps 으로 만든 조직도 앱과 Entra ID를 동기화 해서 사용자 및 그룹 정보를 업데이트 하려고 한다.
아래 진행절차는 아직 구현하지 않은 상태 이며 추후 필요시 내용이 수정 될 수 있다.
진행 절차를 정리하고 차례대로 구현 예정 이다.
여기서는 아래 [진행절차-초기] 3. 선택한 직원의 모든 부서 확인를 구현했다.
[진행절차 - 초기]
1. Entra ID의 그룹 정보를 가져오기
2. Entra ID 그룹 만들기
Entra ID의 그룹과 조직도 앱의 그룹의 메일 주소가 같은지 확인 - Entra ID에는 그룹 이름이 존재 할 수 있음.
3. 선택한 직원의 모든 부서 확인
4. 3번에서 확인한 Entra ID 부서에 직원 추가
[진행절차 - 입사]
1. 직원의 소속그룹을 확인하여 그룹 멤버 추가
[진행절차 - 조직 변경]
1. 조직 부서 이름이 변경되면 Entra ID 그룹의 이름이 변경
2. 직원의 소속그룹을 변경하면 기존 그룹에서 멤버 제거, 선택된 그룹에 멤버 추가
[진행절차 - 퇴사]
1. 기존 그룹에서 멤버를 제거한다.
앞서 설명한 대로 보안 그룹과 달리 Microsoft 365 그룹은 중첩 그룹 (Nested Group)을 지원하지 않는다.
Power Apps에서 기본 기능으로는 보안 그룹을 만들 수 없음으로 Microsoft 365 그룹을 만들어 사용하기로 했다.
조직도에서 소속 부서를 선택하면 상위 부서에도 멤버로 추가 되어야 한다.
여기서는 소속 부서의 상위 부서를 확인 하는 방법을 정리해 보려고 한다.
테스트를 위해 1,2,3 번의 버튼을 클릭하여 컬렉션을 만들고 4번에서 사용자를 선택하면 5번과 6번에 소속 그룹을 확인 할 수 있다.

1. 회사 컬렉션 생성 버튼 - OnSelect
ClearCollect(col_CreateCompany,
{Name:"글로벌소프트",Mail:"PA-Globalsoft",Description : "글로벌소프트", Code : "10"},
{Name:"소프트코리아",Mail:"PA-softkorea",Description : "소프트코리아", Code : "11"}
)
2. 부서 컬렉션 생성 버튼 - OnSelect
ClearCollect(col_CreateDepartment,
{Name:"영업본부",MailNickname:"PA-Sales",Description : "영업본부", OrderNo: "10100030000000000000000000000000", Level:1},
{Name:"영업1팀",MailNickname:"PA-Sales-Sales1Team",Description : "영업본부/영업1팀", OrderNo: "10100031000400000000000000000000", Level:2},
{Name:"영업1파트",MailNickname:"PA-Sales-Sales1Team",Description : "영업본부/영업1팀/영업1파트", OrderNo: "10100031000410001000000000000000", Level:3},
{Name:"영업1파트-1",MailNickname:"PA-Sales-Sales1Team-Sales1",Description : "영업본부/영업1팀/영업1파트/영업1파트-1", OrderNo: "10100031000410001100010000000000", Level:4},
{Name:"영업1파트-1-1",MailNickname:"PA-Sales-Sales1Team-Sales1-1",Description : "영업본부/영업1팀/영업1파트/영업1파트-1/영업1파트-1-1", OrderNo: "10100031000410001100011000100000", Level:5},
{Name:"영업1파트-1-1-1",MailNickname:"PA-Sales-Sales1Team-Sales1-1-1",Description : "영업본부/영업1팀/영업1파트/영업1파트-1/영업1파트-1-1/영업1파트-1-1-1", OrderNo: "10100031000410001100011000110001", Level:6}
)
3. 사용자 컬렉션 생성 버튼 - OnSelect
ClearCollect(col_employee,
{name:"이 완주",mail:"wjlee@globalsoft.co.kr",Department:"영업본부", Company:"글로벌소프트"},
{name:"홍 길동",mail:"gdhong-1@globalsoft.co.kr",Department:"영업1팀", Company:"글로벌소프트"},
{name:"홍 길순",mail:"gshong-3@globalsoft.co.kr",Department:"영업1파트", Company:"글로벌소프트"},
{name:"김 영업",mail:"yuKim@globalsoft.co.kr",Department:"영업1파트-1-1-1", Company:"글로벌소프트"}
)
4. 사용자 선택 - OnChange
Set(CurrentDept,
LookUp(col_CreateDepartment, Name = Dropdown1.SelectedText.Department)
);
ClearCollect(
col_DeptPath, // 결과를 저장할 컬렉션
// 1. 회사 정보 추가
{
Level: 0,
Name: LookUp(col_CreateCompany,Name=Dropdown1.SelectedText.Company,Name),
MailNickname: LookUp(col_CreateCompany,Name=Dropdown1.SelectedText.Company,Mail),
Description: LookUp(col_CreateCompany,Name=Dropdown1.SelectedText.Company,Description)
},
ForAll(
Sequence(CurrentDept.Level, 1, 1), // 1부터 현재 Level까지 반복
With(
{
dept: First(
Filter(
col_CreateDepartment,
StartsWith(
OrderNo,
Left(CurrentDept.OrderNo, 2 + 5 * (Value - 1))
) && Level = Value
)
)
},
{
Level: Value,
Name: dept.Name,
MailNickname: dept.MailNickname,
Description: dept.Description
}
)
)
)
5. 소속 부서 확인 - Items
col_DeptPath
6. 소속 부서 확인
// 현재 부서의 회사 이름을 포함한 전체 경로 생성
With(
{
// 부서 Level 시퀀스 생성
levels: Sequence(CurrentDept.Level, 1, 1)
},
// 회사 이름 + 부서 경로 연결
LookUp(col_CreateCompany,Name=Dropdown1.SelectedText.Company,Name) & "/" &
Concat(
levels,
First(
Filter(
col_CreateDepartment,
StartsWith(
OrderNo,
Left(
CurrentDept.OrderNo,
2 + 5 * (Value - 1)
)
) && Level = Value
)
).Name,
"/" // 구분자
)
)
/*
// 아래 코드를 간소화 하여 위의 코드 작성
With({
// Level 1인 경우
current : Filter(col_CreateDepartment,Name=CurrentDept.Name),
// Level 2인 경우
prior1 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 1))) And Level= CurrentDept.Level - 1),
// Level 3인 경우
prior2 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 2))) And Level= CurrentDept.Level - 2),
// Level 4인 경우
prior3 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 3))) And Level= CurrentDept.Level - 3),
// Level 5인 경우
prior4 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 4))) And Level= CurrentDept.Level - 4),
// Level 6인 경우
prior5 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 5))) And Level= CurrentDept.Level - 5)
},
If(
CurrentDept.Level=1,Concat(current,Name),
CurrentDept.Level=2,Concat(prior1,Name) &"/"& Concat(current,Name),
CurrentDept.Level=3,Concat(prior2,Name) &"/"& Concat(prior1,Name) &"/"& Concat(current,Name),
CurrentDept.Level=4,Concat(prior3,Name) &"/"& Concat(prior2,Name) &"/"& Concat(prior1,Name) &"/"& Concat(current,Name),
CurrentDept.Level=5,Concat(prior4,Name) &"/"& Concat(prior3,Name) &"/"& Concat(prior2,Name) &"/"& Concat(prior1,Name) &"/"& Concat(current,Name),
CurrentDept.Level=6,Concat(prior5,Name) &"/"& Concat(prior4,Name) &"/"& Concat(prior3,Name) &"/"& Concat(prior2,Name) &"/"& Concat(prior1,Name) &"/"& Concat(current,Name)
)
)
*/
Power Apps 전체 코드 - Power Apps에 붙여 넣으면 화면이 생성 됩니다.
Screens:
Select Member Groups:
Properties:
Fill: =RGBA(255, 255, 255, 1)
LoadingSpinnerColor: =RGBA(0, 120, 212, 1)
Children:
- btn_CreateCollect_2:
Control: Classic/Button@2.2.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
BorderStyle: =BorderStyle.None
Color: =RGBA(255, 255, 255, 1)
DisabledBorderColor: =RGBA(0, 0, 0, 0)
DisabledColor: =RGBA(161, 159, 157, 1)
DisabledFill: =RGBA(242, 242, 241, 0)
Fill: =RGBA(0, 120, 212, 1)
Font: =Font.'Segoe UI'
Height: =39
HoverBorderColor: =RGBA(0, 0, 0, 0)
HoverColor: =RGBA(255, 255, 255, 1)
HoverFill: =RGBA(16, 110, 190, 1)
OnSelect: |-
=ClearCollect(col_employee,
{name:"이 완주",mail:"wjlee@globalsoft.co.kr",Department:"영업본부", Company:"글로벌소프트"},
{name:"홍 길동",mail:"gdhong-1@globalsoft.co.kr",Department:"영업1팀", Company:"글로벌소프트"},
{name:"홍 길순",mail:"gshong-3@globalsoft.co.kr",Department:"영업1파트", Company:"글로벌소프트"},
{name:"김 영업",mail:"yuKim@globalsoft.co.kr",Department:"영업1파트-1-1-1", Company:"글로벌소프트"}
)
PressedBorderColor: =RGBA(0, 69, 120, 1)
PressedColor: =RGBA(255, 255, 255, 1)
PressedFill: =RGBA(16, 110, 190, 1)
RadiusBottomLeft: =0
RadiusBottomRight: =0
RadiusTopLeft: =0
RadiusTopRight: =0
Size: =13
Text: ="사용자 컬렉션 만들기"
Width: =238
X: =518
Y: =24
- Gallery2:
Control: Gallery@2.15.0
Variant: BrowseLayout_Vertical_TwoTextOneImageVariant_ver5.0
Properties:
BorderColor: =RGBA(245, 245, 245, 1)
Height: =405
Items: =col_employee
TemplateSize: =96
Width: =390
X: =518
Y: =71
Children:
- Title2:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(50, 49, 48, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =Self.Size * 1.8
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =14
Text: =ThisItem.name
VerticalAlign: =VerticalAlign.Top
Width: =Parent.TemplateWidth - 173
X: =39
Y: =12
- Subtitle2:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(96, 94, 92, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =Self.Size * 1.8
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =12
Text: =ThisItem.mail
VerticalAlign: =VerticalAlign.Top
Width: =Title2.Width
X: =39
Y: =37
- NextArrow2:
Control: Classic/Icon@2.5.0
Properties:
AccessibleLabel: =Self.Tooltip
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(166, 166, 166, 1)
DisabledBorderColor: =RGBA(56, 56, 56, 1)
DisabledColor: =RGBA(119, 119, 119, 1)
FocusedBorderThickness: =4
Height: =50
Icon: =Icon.ChevronRight
OnSelect: =Select(Parent)
PaddingBottom: =16
PaddingLeft: =16
PaddingRight: =16
PaddingTop: =16
Tooltip: ="항목 세부 정보 보기"
Width: =50
X: =Parent.TemplateWidth - Self.Width - 12
Y: =(Parent.TemplateHeight / 2) - (Self.Height / 2)
- Separator2:
Control: Rectangle@2.3.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
Fill: =RGBA(255, 255, 255, 1)
Height: =8
OnSelect: =Select(Parent)
Width: =Parent.TemplateWidth
Y: =Parent.TemplateHeight - Self.Height
- Rectangle2:
Control: Rectangle@2.3.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
Fill: =RGBA(0, 120, 212, 1)
Height: =Parent.TemplateHeight - Separator2.Height
OnSelect: =Select(Parent)
Visible: =ThisItem.IsSelected
Width: =4
- Title2_1:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(50, 49, 48, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =25
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =14
Text: =ThisItem.Department
VerticalAlign: =VerticalAlign.Top
Width: =193
X: =185
Y: =12
- btn_CreateCollect_3:
Control: Classic/Button@2.2.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
BorderStyle: =BorderStyle.None
Color: =RGBA(255, 255, 255, 1)
DisabledBorderColor: =RGBA(0, 0, 0, 0)
DisabledColor: =RGBA(161, 159, 157, 1)
DisabledFill: =RGBA(242, 242, 241, 0)
Fill: =RGBA(0, 120, 212, 1)
Font: =Font.'Segoe UI'
Height: =39
HoverBorderColor: =RGBA(0, 0, 0, 0)
HoverColor: =RGBA(255, 255, 255, 1)
HoverFill: =RGBA(16, 110, 190, 1)
OnSelect: |-
=ClearCollect(col_CreateCompany,
{Name:"글로벌소프트",Mail:"PA-Globalsoft",Description : "글로벌소프트", Code : "10"},
{Name:"소프트코리아",Mail:"PA-softkorea",Description : "소프트코리아", Code : "11"}
)
PressedBorderColor: =RGBA(0, 69, 120, 1)
PressedColor: =RGBA(255, 255, 255, 1)
PressedFill: =RGBA(16, 110, 190, 1)
RadiusBottomLeft: =0
RadiusBottomRight: =0
RadiusTopLeft: =0
RadiusTopRight: =0
Size: =13
Text: ="회사 컬렉션 만들기"
Width: =238
X: =43
Y: =24
- gal_Company:
Control: Gallery@2.15.0
Variant: BrowseLayout_Vertical_TwoTextOneImageVariant_ver5.0
Properties:
BorderColor: =RGBA(245, 245, 245, 1)
Height: =155
Items: =col_CreateCompany
TemplateSize: =76
Width: =390
X: =43
Y: =71
Children:
- Title2_2:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(50, 49, 48, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =25
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =14
Text: =ThisItem.Name
VerticalAlign: =VerticalAlign.Top
Width: =157
X: =39
Y: =13
- Subtitle2_1:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(96, 94, 92, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =Self.Size * 1.8
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =12
Text: =ThisItem.Mail
VerticalAlign: =VerticalAlign.Top
Width: =Title2_2.Width
X: =39
Y: =38
- NextArrow2_1:
Control: Classic/Icon@2.5.0
Properties:
AccessibleLabel: =Self.Tooltip
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(166, 166, 166, 1)
DisabledBorderColor: =RGBA(56, 56, 56, 1)
DisabledColor: =RGBA(119, 119, 119, 1)
Height: =50
Icon: =Icon.ChevronRight
OnSelect: =Select(Parent)
PaddingBottom: =16
PaddingLeft: =16
PaddingRight: =16
PaddingTop: =16
Tooltip: ="항목 세부 정보 보기"
Width: =50
X: =Parent.TemplateWidth - Self.Width - 12
Y: =(Parent.TemplateHeight / 2) - (Self.Height / 2)
- Separator2_1:
Control: Rectangle@2.3.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
Fill: =RGBA(255, 255, 255, 1)
Height: =8
OnSelect: =Select(Parent)
Width: =Parent.TemplateWidth
Y: =Parent.TemplateHeight - Self.Height
- Rectangle2_1:
Control: Rectangle@2.3.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
Fill: =RGBA(0, 120, 212, 1)
Height: =Parent.TemplateHeight - Separator2_1.Height
OnSelect: =Select(Parent)
Visible: =ThisItem.IsSelected
Width: =4
- Title2_3:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(50, 49, 48, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =25
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =14
Text: =ThisItem.Description
VerticalAlign: =VerticalAlign.Top
Width: =193
X: =185
Y: =13
- Subtitle2_4:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(96, 94, 92, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =17
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =12
Text: =ThisItem.Code
VerticalAlign: =VerticalAlign.Top
Width: =Title2_2.Width
X: =185
Y: =38
- gal_Department:
Control: Gallery@2.15.0
Variant: BrowseLayout_Vertical_TwoTextOneImageVariant_ver5.0
Properties:
BorderColor: =RGBA(245, 245, 245, 1)
Height: =456
Items: =col_CreateDepartment
TemplateSize: =91
Width: =421
X: =47
Y: =312
Children:
- Title2_4:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(50, 49, 48, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =25
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =14
Text: =ThisItem.Name
VerticalAlign: =VerticalAlign.Top
Width: =157
X: =21
Y: =8
- Subtitle2_2:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(96, 94, 92, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =21
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =12
Text: =ThisItem.Level
VerticalAlign: =VerticalAlign.Top
Width: =139
X: =4
Y: =41
- Separator2_2:
Control: Rectangle@2.3.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
Fill: =RGBA(255, 255, 255, 1)
Height: =8
OnSelect: =Select(Parent)
Width: =Parent.TemplateWidth
Y: =Parent.TemplateHeight - Self.Height
- Rectangle2_2:
Control: Rectangle@2.3.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
Fill: =RGBA(0, 120, 212, 1)
Height: =Parent.TemplateHeight - Separator2_2.Height
OnSelect: =Select(Parent)
Visible: =ThisItem.IsSelected
Width: =4
- Title2_5:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(50, 49, 48, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =25
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =14
Text: =ThisItem.Description
VerticalAlign: =VerticalAlign.Top
Width: =272
X: =143
Y: =8
- Title2_6:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(50, 49, 48, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =25
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =14
Text: =ThisItem.MailNickname
VerticalAlign: =VerticalAlign.Top
Width: =397
X: =35
Y: =58
- Subtitle2_3:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(96, 94, 92, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =23
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =12
Text: =ThisItem.OrderNo
VerticalAlign: =VerticalAlign.Top
Width: =380
X: =35
Y: =39
- Label1:
Control: Label@2.5.1
Properties:
Align: =Align.Right
BorderColor: =RGBA(0, 0, 0, 0)
BorderStyle: =BorderStyle.None
BorderThickness: =2
Color: =RGBA(50, 49, 48, 1)
DisabledBorderColor: =RGBA(0, 0, 0, 0)
DisabledColor: =RGBA(161, 159, 157, 1)
FocusedBorderThickness: =4
Font: =Font.'Segoe UI'
Height: =46
Live: =
Text: "=// 현재 부서의 회사 이름을 포함한 전체 경로 생성\r\nWith(\r\n { \r\n // 부서 Level 시퀀스 생성\r\n levels: Sequence(CurrentDept.Level, 1, 1)\r\n },\r\n\r\n // 회사 이름 + 부서 경로 연결\r\n LookUp(col_CreateCompany,Name=Dropdown1.SelectedText.'data-ADB4D7A662F548B49FAC2B986E348A1BCompany',Name) & \"/\" &\r\n Concat(\r\n levels,\r\n First(\r\n Filter(\r\n col_CreateDepartment,\r\n StartsWith(\r\n OrderNo,\r\n Left(\r\n CurrentDept.OrderNo,\r\n 2 + 5 * (Value - 1)\r\n )\r\n ) && Level = Value\r\n )\r\n ).Name,\r\n \"/\" // 구분자\r\n )\r\n)\r\n\r\n\r\n\r\n/*\r\n// 아래 코드를 간소화 하여 위의 코드 작성\r\n\r\nWith({\r\n // Level 1인 경우\r\n current : Filter(col_CreateDepartment,Name=CurrentDept.Name),\r\n\r\n // Level 2인 경우\r\n prior1 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 1))) And Level= CurrentDept.Level - 1),\r\n\r\n // Level 3인 경우\r\n prior2 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 2))) And Level= CurrentDept.Level - 2),\r\n\r\n // Level 4인 경우\r\n prior3 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 3))) And Level= CurrentDept.Level - 3),\r\n\r\n // Level 5인 경우\r\n prior4 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 4))) And Level= CurrentDept.Level - 4),\r\n \r\n // Level 6인 경우\r\n prior5 : Filter(col_CreateDepartment,StartsWith(OrderNo, Left(CurrentDept.OrderNo,2+5*(CurrentDept.Level - 5))) And Level= CurrentDept.Level - 5)\r\n },\r\n \r\n If(\r\n CurrentDept.Level=1,Concat(current,Name),\r\n CurrentDept.Level=2,Concat(prior1,Name) &\"/\"& Concat(current,Name),\r\n CurrentDept.Level=3,Concat(prior2,Name) &\"/\"& Concat(prior1,Name) &\"/\"& Concat(current,Name),\r\n CurrentDept.Level=4,Concat(prior3,Name) &\"/\"& Concat(prior2,Name) &\"/\"& Concat(prior1,Name) &\"/\"& Concat(current,Name), \r\n CurrentDept.Level=5,Concat(prior4,Name) &\"/\"& Concat(prior3,Name) &\"/\"& Concat(prior2,Name) &\"/\"& Concat(prior1,Name) &\"/\"& Concat(current,Name), \r\n CurrentDept.Level=6,Concat(prior5,Name) &\"/\"& Concat(prior4,Name) &\"/\"& Concat(prior3,Name) &\"/\"& Concat(prior2,Name) &\"/\"& Concat(prior1,Name) &\"/\"& Concat(current,Name) \r\n )\r\n)\r\n*/"
Width: =744
X: =601
Y: =653
- Dropdown1:
Control: Classic/DropDown@2.3.1
Properties:
BorderColor: =RGBA(245, 245, 245, 1)
ChevronBackground: =RGBA(245, 245, 245, 1)
ChevronDisabledBackground: =RGBA(242, 242, 241, 0)
ChevronDisabledFill: =RGBA(161, 159, 157, 1)
ChevronFill: =RGBA(50, 49, 48, 1)
ChevronHoverBackground: =RGBA(245, 245, 245, 1)
ChevronHoverFill: =RGBA(50, 49, 48, 1)
Color: =RGBA(50, 49, 48, 1)
DisabledBorderColor: =RGBA(0, 0, 0, 0)
DisabledColor: =RGBA(161, 159, 157, 1)
DisabledFill: =RGBA(242, 242, 241, 0)
Fill: =RGBA(245, 245, 245, 1)
Font: =Font.'Segoe UI'
HoverBorderColor: =RGBA(16, 110, 190, 1)
HoverColor: =RGBA(50, 49, 48, 1)
HoverFill: =RGBA(245, 245, 245, 1)
Items: =col_employee
Items.Value: =name
OnChange: "=Set(CurrentDept,\r\n LookUp(col_CreateDepartment, Name = Dropdown1.SelectedText.'data-ADB4D7A662F548B49FAC2B986E348A1BDepartment')\r\n \r\n);\r\n\r\nClearCollect(\r\n col_DeptPath, // 결과를 저장할 컬렉션\r\n // 1. 회사 정보 추가\r\n {\r\n Level: 0,\r\n Name: LookUp(col_CreateCompany,Name=Dropdown1.SelectedText.'data-ADB4D7A662F548B49FAC2B986E348A1BCompany',Name),\r\n MailNickname: LookUp(col_CreateCompany,Name=Dropdown1.SelectedText.'data-ADB4D7A662F548B49FAC2B986E348A1BCompany',Mail),\r\n Description: LookUp(col_CreateCompany,Name=Dropdown1.SelectedText.'data-ADB4D7A662F548B49FAC2B986E348A1BCompany',Description)\r\n },\r\n ForAll(\r\n Sequence(CurrentDept.Level, 1, 1), // 1부터 현재 Level까지 반복\r\n With(\r\n {\r\n dept: First(\r\n Filter(\r\n col_CreateDepartment,\r\n StartsWith(\r\n OrderNo,\r\n Left(CurrentDept.OrderNo, 2 + 5 * (Value - 1))\r\n ) && Level = Value\r\n )\r\n )\r\n },\r\n {\r\n Level: Value,\r\n Name: dept.Name,\r\n MailNickname: dept.MailNickname,\r\n Description: dept.Description\r\n }\r\n )\r\n )\r\n)"
PaddingBottom: =5
PaddingLeft: =12
PaddingRight: =5
PaddingTop: =5
PressedBorderColor: =RGBA(16, 110, 190, 1)
PressedColor: =RGBA(255, 255, 255, 1)
PressedFill: =RGBA(0, 120, 212, 1)
SelectionColor: =RGBA(50, 49, 48, 1)
SelectionFill: =RGBA(0, 120, 212, 1)
X: =1019
Y: =81
- Label3:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
BorderStyle: =BorderStyle.None
BorderThickness: =2
Color: =RGBA(255, 255, 255, 1)
DisabledBorderColor: =RGBA(0, 0, 0, 0)
DisabledColor: =RGBA(161, 159, 157, 1)
Fill: =RGBA(161, 159, 157, 1)
FocusedBorderThickness: =4
Font: =Font.'Segoe UI'
Text: ="소속 그룹 확인"
Width: =328
X: =1019
Y: =24
- btn_CreateCollect_6:
Control: Classic/Button@2.2.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
BorderStyle: =BorderStyle.None
Color: =RGBA(255, 255, 255, 1)
DisabledBorderColor: =RGBA(0, 0, 0, 0)
DisabledColor: =RGBA(161, 159, 157, 1)
DisabledFill: =RGBA(242, 242, 241, 0)
Fill: =RGBA(0, 120, 212, 1)
Font: =Font.'Segoe UI'
Height: =39
HoverBorderColor: =RGBA(0, 0, 0, 0)
HoverColor: =RGBA(255, 255, 255, 1)
HoverFill: =RGBA(16, 110, 190, 1)
OnSelect: |-
=ClearCollect(col_CreateDepartment,
{Name:"영업본부",MailNickname:"PA-Sales",Description : "영업본부", OrderNo: "10100030000000000000000000000000", Level:1},
{Name:"영업1팀",MailNickname:"PA-Sales-Sales1Team",Description : "영업본부/영업1팀", OrderNo: "10100031000400000000000000000000", Level:2},
{Name:"영업1파트",MailNickname:"PA-Sales-Sales1Team",Description : "영업본부/영업1팀/영업1파트", OrderNo: "10100031000410001000000000000000", Level:3},
{Name:"영업1파트-1",MailNickname:"PA-Sales-Sales1Team-Sales1",Description : "영업본부/영업1팀/영업1파트/영업1파트-1", OrderNo: "10100031000410001100010000000000", Level:4},
{Name:"영업1파트-1-1",MailNickname:"PA-Sales-Sales1Team-Sales1-1",Description : "영업본부/영업1팀/영업1파트/영업1파트-1/영업1파트-1-1", OrderNo: "10100031000410001100011000100000", Level:5},
{Name:"영업1파트-1-1-1",MailNickname:"PA-Sales-Sales1Team-Sales1-1-1",Description : "영업본부/영업1팀/영업1파트/영업1파트-1/영업1파트-1-1/영업1파트-1-1-1", OrderNo: "10100031000410001100011000110001", Level:6}
)
PressedBorderColor: =RGBA(0, 69, 120, 1)
PressedColor: =RGBA(255, 255, 255, 1)
PressedFill: =RGBA(16, 110, 190, 1)
RadiusBottomLeft: =0
RadiusBottomRight: =0
RadiusTopLeft: =0
RadiusTopRight: =0
Size: =13
Text: ="부서 컬렉션 만들기"
Width: =238
X: =43
Y: =253
- Gallery4:
Control: Gallery@2.15.0
Variant: BrowseLayout_Vertical_TwoTextOneImageVariant_ver5.0
Properties:
BorderColor: =RGBA(245, 245, 245, 1)
Height: =456
Items: =col_DeptPath
Width: =326
X: =1019
Y: =142
Children:
- Title3:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(50, 49, 48, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =25
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =14
Text: =ThisItem.Name
VerticalAlign: =VerticalAlign.Top
Width: =Parent.TemplateWidth - 173
X: =20
Y: =16
- Subtitle3:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(96, 94, 92, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =27
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =12
Text: |+
=ThisItem.MailNickname
VerticalAlign: =VerticalAlign.Top
Width: =300
X: =20
Y: =69
- NextArrow3:
Control: Classic/Icon@2.5.0
Properties:
AccessibleLabel: =Self.Tooltip
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(166, 166, 166, 1)
DisabledBorderColor: =RGBA(56, 56, 56, 1)
DisabledColor: =RGBA(119, 119, 119, 1)
Height: =50
Icon: =Icon.ChevronRight
OnSelect: =Select(Parent)
PaddingBottom: =16
PaddingLeft: =16
PaddingRight: =16
PaddingTop: =16
Tooltip: ="항목 세부 정보 보기"
Width: =50
X: =Parent.TemplateWidth - Self.Width - 12
Y: =(Parent.TemplateHeight / 2) - (Self.Height / 2)
- Separator3:
Control: Rectangle@2.3.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
Fill: =RGBA(255, 255, 255, 1)
Height: =8
OnSelect: =Select(Parent)
Width: =Parent.TemplateWidth
Y: =Parent.TemplateHeight - Self.Height
- Rectangle3:
Control: Rectangle@2.3.0
Properties:
BorderColor: =RGBA(0, 0, 0, 0)
Fill: =RGBA(0, 120, 212, 1)
Height: =Parent.TemplateHeight - Separator3.Height
OnSelect: =Select(Parent)
Visible: =ThisItem.IsSelected
Width: =4
- Subtitle3_1:
Control: Label@2.5.1
Properties:
BorderColor: =RGBA(0, 0, 0, 1)
Color: =RGBA(96, 94, 92, 1)
DisabledColor: =RGBA(161, 159, 157, 1)
Font: =Font.'Segoe UI'
FontWeight: =If(ThisItem.IsSelected, FontWeight.Semibold, FontWeight.Normal)
Height: =22
OnSelect: =Select(Parent)
PaddingBottom: =0
PaddingLeft: =12
PaddingRight: =0
PaddingTop: =0
Size: =12
Text: |
=ThisItem.Description
VerticalAlign: =VerticalAlign.Top
Width: =255
X: =20
Y: =47