티스토리 뷰

IT/PowerApps

PowerApps Pen Input check

Last72 2020. 9. 8. 15:34

Example case: The submit button only enables when the pen input (Signature) is filled.

 

Old way

App.OnStart

Set(initialTeamLeaderSig, penManagerERS.Image);

Pen.OnSelect

Set(TeamLeaderSig, penTeamLeaderERS.Image)

Button.DisplayMode

If(TeamLeaderSig <> initialTeamLeaderSig, DisplayMode.Edit, DisplayMode.Disabled)

Issue: when user clicks and not draw anything, the button still enabled.

 

New way

Screen.OnVisible

UpdateContext({locTeamLeaderSigBlank: JSON(PenInput1.ImageJSONFormat.IncludeBinaryData)})

Pen.OnSelect

UpdateContext({locTeamLeaderSigCurrent: JSON(Self.ImageJSONFormat.IncludeBinaryData)});

ResetBtn.OnSelect

Reset(PenInput1);

UpdateContext({locTeamLeaderSigTimerStart: false});

UpdateContext({locTeamLeaderSigTimerStart: true});

Timer.Start

locTeamLeaderSigTimerStart

Timer.Visible

false

Timer.OnTimerEnd

UpdateContext({locTeamLeaderSigCurrent: JSON(PenInput1.ImageJSONFormat.IncludeBinaryData)});

Timer.Duration

50

SubmitBtn.DisplayMode

locTeamLeaderSigBlank<>locTeamLeaderSigCurrent

 

'IT > PowerApps' 카테고리의 다른 글

Finding hidden AdvancedFind for Dataverse  (0) 2024.07.17
Export Case with attachments  (0) 2021.08.15
PowerApps Get the height of Gallery  (0) 2020.09.25
PowerApps Direct interface to Document Library  (0) 2020.09.25
Grid in PowerApps  (0) 2020.09.09
댓글
Announcement
Recent Posts
Recent Comments
Total
Today
Yesterday
Link
TAG
more
«   2024/12   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Search by month