Please reread the page carefully. You may also want to look at how events are routed in forms. What is the next event after "Validating"?
WHen validation fails we want to stop(cancel) processing the event.
Search found 15436 matches
- Mon May 29, 2023 8:11 pm
- Forum: PowerShell GUIs
- Topic: Form validation doco
- Replies: 7
- Views: 914
- Thu May 25, 2023 9:39 pm
- Forum: PowerShell GUIs
- Topic: Unhandled Exception "System Error"
- Replies: 8
- Views: 1492
Re: Unhandled Exception "System Error"
The word I posted is "contains". You really need to take time to learn PowerShell basics and these things wouldn't happen.
if(Get-ADUser $Cred.UserName -Properties memberof).memberOf -contains 'Groupname'){
if(Get-ADUser $Cred.UserName -Properties memberof).memberOf -contains 'Groupname'){
- Thu May 25, 2023 11:14 am
- Forum: PowerShell GUIs
- Topic: Unhandled Exception "System Error"
- Replies: 8
- Views: 1492
Re: Unhandled Exception "System Error"
Likely the user does not exist. Get user separately to be sure you have one.
- Wed May 24, 2023 5:02 pm
- Forum: PowerShell GUIs
- Topic: Unhandled Exception "System Error"
- Replies: 8
- Views: 1492
Re: Unhandled Exception "System Error"
"MemberOf" is a list of items so "like" will not work as expected.
I recommend taking some time to learn basic programming primitives that allow us to match select and filter items and groups.
if(Get-ADUser $Cred.UserName -Properties memberof).memberOf -contains 'Groupname' ){
I recommend taking some time to learn basic programming primitives that allow us to match select and filter items and groups.
if(Get-ADUser $Cred.UserName -Properties memberof).memberOf -contains 'Groupname' ){
- Mon May 22, 2023 7:44 pm
- Forum: PowerShell GUIs
- Topic: datagridwiew result
- Replies: 5
- Views: 960
Re: datagridwiew result
The issue is tat you are not working with "Object" or "PsObject" collections:. Tiese objects are "CIM" objects, See: TypeName: Selected.Microsoft.Management.Infrastructure.CimInstance Name MemberType Definition ---- ---------- ---------- Equals Method bool Equals(System...
- Fri May 19, 2023 4:05 pm
- Forum: PowerShell GUIs
- Topic: Unhandled Exception "System Error"
- Replies: 8
- Views: 1492
Re: Unhandled Exception "System Error"
"Match" requires a regex expression. "Like" requires a wild card.
- Fri Apr 21, 2023 1:55 pm
- Forum: PowerShell GUIs
- Topic: Exit Splash Screen
- Replies: 2
- Views: 2018
Re: Exit Splash Screen
Everything you need to know about a SplashScreen is here: https://info.sapien.com/index.php/how-t ... ens-batman
- Wed Apr 19, 2023 2:56 pm
- Forum: PowerShell GUIs
- Topic: Gui display unique names
- Replies: 4
- Views: 1956
Re: Gui display unique names
What you want cannot be done with a textbox except by programmatically editing the block of text. Use the "-replace on the "Text" property to replace any string.
- Wed Apr 12, 2023 4:14 pm
- Forum: PowerShell
- Topic: Creating A Service script
- Replies: 3
- Views: 4737
Re: Creating A Service script
When the "paused" frag is true the service runs in the sleep section. When false it takes the other path. Why would you want it to do this? Pausing just skips the main loop. Where did you get the original code? There is no not need to put continue into the paused section. The "if"...
- Thu Apr 06, 2023 5:22 pm
- Forum: PowerShell GUIs
- Topic: Run Form in Full Mode
- Replies: 1
- Views: 915
Re: Run Form in Full Mode
This is due to building on a machine wi
th one resolution and running on a system with a different resolution.
See the following articles: https://info.sapien.com/index.php/guis/ ... i-displays
th one resolution and running on a system with a different resolution.
See the following articles: https://info.sapien.com/index.php/guis/ ... i-displays