cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Julien2
Post Prodigy
Post Prodigy

PenInput Validation customized with a SharePoint Form

Hello,


I have customized a SharePoint form through Power Apps and I have added a field called Manager signatures. In this field, I have added a Pen input signature and a button.

What I want to achieve is the following:

  • I want to hide the submit button if the signature is blank else it will display. I have set the visibility of the button to false if the SharePoint form is "New". So what would be the function with the signature condition?

 

If(SharePointForm1.Mode=New,false,true)​

 

  • Besides, I would like to know if it's possible to add a condition to check if the form was already signed by a manager and submitted to hide the Pen Input signature only at "Edit" form action. If so, what would be this condition?

I have tried to implement the following:
1. Set the OnVisible button to the following function which caused an error: (PenInput3 represents my PenInput field)

 

If(SharePointForm1.Mode=New && IsBlank(PenInput3.Image), DisplayMode.Disabled, DisplayMode.Edit), false,true)

 

Capture.PNG

2. I have tried to follow the steps mentioned by Shane but unfortunately, nothing happens.

Pen Input is Blank 

 

Can someone please explain in detail and provide an example to achieve the following scenario?

Any help will be greatly appreciated.
Thank you.

14 REPLIES 14

Hello @WarrenBelz ,

I want to inform you that the visibility of the button is working as expected once, which means for only one record that is signed, but let's suppose I want to add my signature to another record, again the send email button appears.

I expect that because I have to reset the PenInput1 image after the submission or close button in the popup.

Please have a look at the Demo below:

Demo1.gif

If so, what would be the property to handle this issue?

Looking forward to your response.
Thank you for your support.

Hello @Julien2 ,

Yes - I must admit I never tested that, however it should be easy to fix - just set (as you have mentioned) the variable when opening the pop-up. That way, it will always reflect the current condition of the pen input.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hello @WarrenBelz ,

 

I have set the variable to the button that opens the Popup OnSelect property to the following:

Capture.PNG

Unfortunately, the send email button doesn't take effect to be invisible when opening a new item that is not signed.

 

What I am doing wrong?

 

Looking forward to hearing from you.
Thank you!

Hi @Julien2 ,

You need to set the Variable in the screen pop-up

UpdateContext({Popup:true});
UpdateContext({EmptySign:PenInput1.Image})

That way every time you initiate the pop-up the button should not appear as you have set the variable to reflect the current state (empty) of the pen input. 

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Hi @WarrenBelz ,

 

Thank you very much for your support.
The set variable you mentioned in the last post has resolved my issue and worked as expected.

 

Best Regards,
Julien

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (83,135)