cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Super User
Super User

How do you determine if Pen Input is blank?

I want to have a pen input to collect a signature and I only want to show the user the submit button after they have signed the form. 

 

How do I check if they have scribbled something in the box or not?

 

Thanks

 


Shane

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
28 REPLIES 28
Highlighted

Hey @timl I missed this the first time. I just tested again and my PenInpu1.Strokes is always Empty. 😞 I have never gotten it to work. 😞 

 

@Anonymous I will be mean and tell you that you want to incorporate the Or function (And could also work) but I will not tell you the syntax. Blame the last guy that I only gave the part solution and he had a great experience figuring it out himself. If you don't get it let me know and I will tell you the solution. 🙂

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
Highlighted

Hi @Shanescows

 

I've just tested this again and I think I understand what's going on!  .Strokes only works in the Windows version of Studio.

 

In the browser, I can recreate the behavior that you see where .Strokes is always empty. But in the Windows version, it returns data. I think this must be a bug.

 

Here's a screenshot of the test that I just carried out. Something you might find interesting is that compared to the screenshot that I made earlier in the post (on the 21st Feb), the format of the data that .Stokes returns is now different. It used to begin "blob:" whereas now, it begins "appres://blobmanager/".

 

Strokes2.JPG

 

 

 

 

 

Highlighted
Anonymous
Not applicable

@Shanescows

No worries, thank you! I will have a play around and let you know how I go 🙂

Highlighted

Actually Shane, seems as soon as you mouse over in preview mode at least it goes to not the same... even if you dont have a mouse click.

If(PenEntr_2.Image=BlankImageE,"empty","signed")

mouse over it.. signed....

Highlighted

Hm. I have not had this experience.

  1. Set a variable OnVisible of screen: Set(varPenInput, PenInput.Image)
  2. Insert a Label Control and set its Text Property to varPenInput
  3. When the screen becomes visible, you should see a URL "of sorts" (appres://xyz123)
  4. Move to Preview Mode (click the Play icon in top right corner of IDE)
  5. When you hover over the Pen Input, this value does NOT change
  6. When you scribble something in the Pen Input box, the value DOES change

I'd like to know when your value changes.

Highlighted

I tried the workaround and I am running into the same problem. I think they changed the way they store the blob image.  Now it stores something like this:

 

appres://blobmanager/82dd151c35b74b4a9893ae18fcba5d89/1

 

This will be the value when the form opens, but as the screen is being rendered, that value changes, to something like

appres://blobmanager/82dd151c35b74b4a9893ae18fcba5d89/5

 

And the before & after values will never equal each other, therefore the Save / Consent button will always be in Edit mode, not Disabled.

 

How do I get it to work now?

Highlighted

@grahampasmurf  did you ever get a solution to this? I am trying to inspect the my PenInput.Image to see if it has changed so that I can skip a call to my flow with the use of an If statement. I'm using a canvas app. Everytime the screen with the pen input renders the PenInput.Image value changes as you have stated.

Highlighted

Did you try the step-by-step instructions above?
Attached is an example app for your reference.

Import and enjoy.

Highlighted

@seadude thank you, works great, very cleverSmiley LOL

Highlighted

If its marked as a solution, others will find it 🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (16,029)