Create Login Form by NiceForms

Label printing integration (NiceWatch middleware and ActiveX programming interface)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
dungsato
Newcomer
Posts: 2
Joined: Thu Jun 08, 2017 3:10 am

Create Login Form by NiceForms

Post by dungsato » Tue Jun 13, 2017 3:27 am

Dear Everyone,
Thank you for your strong support.
I'm new to NiceLable
Today I have a trouble with Login form using NiceForm.
I have a form with username and password, I need to compare with datarows from MSExcel.
If OK, call MainForm, else return MesssageBox.
Anyone who have experiences in this case, please help me.

User avatar
Saso
NiceLabel
NiceLabel
Posts: 2980
Joined: Mon Sep 04, 2006 8:09 am
Contact:

Re: Create Login Form by NiceForms

Post by Saso » Thu Jul 06, 2017 9:09 am

Well, you need to compare the entered username & password with the stored ones and then run conditional actions. You would open another form if entered data matches the data in Excel. You would display popup message otherwise.

This would be much easier, if you would have a real database, not Excel file (spreadsheet). Then you can run the action Execute SQL Statement and simply try to find matching data in database. If you find it, the user has entered correct username & password. If not, you show message.

OK, also with Excel file, there is a workaround. But you have to connect Excel file to a Table object and show Table on the form. Then you have to configure filter in the connection to the Excel (the entered username must match the username in Excel and the entered password must match password in Excel).
s1.png
s1.png (26.08 KiB) Viewed 4867 times
You can hide Table object (set property Visible to false), so it it not visible once the form is running. You can also resize Table object to a tiny object with a few pixels across. ;-)

If the matching user is found in Excel, the values for database fields [Sheet1$.Username] and [Sheet1$.Password] will not be empty. You can use this information to defined conditional actions Message (for popup message) and Open Another Form.
s2.png
s2.png (53.96 KiB) Viewed 4867 times
See the attached sample created in NiceLabel 2017.

Note: This sample stores passwords as plaintext. Bad idea! ;)
Attachments
sample.zip
(11.86 KiB) Downloaded 218 times
Saso Fleiser
Senior Technical Product Specialist

rbaptista
Enthusiast
Posts: 13
Joined: Mon Aug 26, 2019 11:12 am

Re: Create Login Form by NiceForms

Post by rbaptista » Wed Aug 28, 2019 12:26 pm

If the logins table is in SQL as is procedure?

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 548
Joined: Mon Aug 28, 2017 3:07 pm

Re: Create Login Form by NiceForms

Post by Kyleodonnell » Wed Aug 28, 2019 1:42 pm

Rbaptista,

We are not quite sure what you are asking, are you inquiring if this can be done in SQL?

rbaptista
Enthusiast
Posts: 13
Joined: Mon Aug 26, 2019 11:12 am

Re: Create Login Form by NiceForms

Post by rbaptista » Wed Aug 28, 2019 2:54 pm

yes! its possible? how?

User avatar
Kyleodonnell
NiceLabel Support
NiceLabel Support
Posts: 548
Joined: Mon Aug 28, 2017 3:07 pm

Re: Create Login Form by NiceForms

Post by Kyleodonnell » Wed Aug 28, 2019 3:44 pm

Rbaptista,

A simple example would be using a script to compare against a SQL database for a single login
script.PNG
script.PNG (21.77 KiB) Viewed 3231 times
We have attached a simple sample, with SQL backup included
https://drive.google.com/file/d/17Pjoke ... sp=sharing

We have also created a solution that uses multiple logins as a filter is applied in the form
Filter.PNG
Filter.PNG (43.96 KiB) Viewed 3230 times
And then the script checks against those filtered records
https://drive.google.com/file/d/1FIrfo- ... sp=sharing

rbaptista
Enthusiast
Posts: 13
Joined: Mon Aug 26, 2019 11:12 am

Re: Create Login Form by NiceForms

Post by rbaptista » Wed Aug 28, 2019 8:14 pm

PERFECT!!!
Is working !! Thanks again for all support.

jorgepp
Newcomer
Posts: 1
Joined: Sun Sep 29, 2019 12:23 pm

Re: Create Login Form by NiceForms

Post by jorgepp » Sun Sep 29, 2019 12:24 pm

It works perfect! thanks support!

videos porno cumlouder chat erotico

AliceSantos2
Newcomer
Posts: 1
Joined: Thu Jun 18, 2020 7:53 pm

Re: Create Login Form by NiceForms

Post by AliceSantos2 » Thu Jun 18, 2020 7:57 pm

Oh, my God. Thank you all so much for your refreshments. This is all very new to me and when I came across this mistake I didn't even know how to do the consultation, I'm glad it's so easy to adjust. Your explanation was very clear and I was able to do it without problems! God bless you all!

CharlesTronte
Newcomer
Posts: 1
Joined: Mon Jun 29, 2020 9:00 pm
Contact:

Re: Create Login Form by NiceForms

Post by CharlesTronte » Mon Jun 29, 2020 9:18 pm

Hello! Another Newbie here on the forum! I was going through the same problem, but now that I've seen the solution and the response from several users indicating that it works, I think I'll try it step by step as they mention it. Or I'll try changing the excel table to the database if that makes it simpler. Greetings.

Post Reply