Show only records with filled field BUT...

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
ricardo
Valued Contributor
Posts: 21
Joined: Mon Nov 14, 2011 8:14 pm
Location: Porto, Portugal
Contact:

Show only records with filled field BUT...

Post by ricardo » Mon Nov 30, 2020 4:21 pm

Hi all.

On Powerforms, I'm using a database table that shows records from a MySQL database with some filters that are choosen by some list boxes. It works fine.

Now, customer is asking us to do another filter, but this filter is based in 2 fields of database.

Field 1 has label layout for article.
Field 2 has label layout for boxes.

What we need to do is to limit the products display list by choosing "Article" or "Box". If I choose "Article" it will show only records with Field 1 filled and if I choose "Box" will show only records with Field 2 filled.


Any idea how to achieve this?

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

Re: Show only records with filled field BUT...

Post by Kyleodonnell » Mon Nov 30, 2020 6:33 pm

Ricardo,

you may have to run a sql statment on a variable even for each field, so that when the correct field is selected, it will run the query

ricardo
Valued Contributor
Posts: 21
Joined: Mon Nov 14, 2011 8:14 pm
Location: Porto, Portugal
Contact:

Re: Show only records with filled field BUT...

Post by ricardo » Fri Dec 04, 2020 5:09 pm

Hi Kyle,
thank you for your suggestion.

I've decided to make 2 different queries and put 2 different database tables on form, showing one or the other depending of the selected option.

As I'm using lot of fields from database it would be a nightmare to manage that (it is already with database tables :D )

Post Reply