Hi,
I have a database of IT assets. The asset can have different status (In use/in maintenance/waiting parts/faulty).
For this status I have forms (in use/maintenance/wparts/faulty). These forms use the same table but the edit screen just shows the necessary field for that status.
I world like to do different according to the status:
Is this possible?
Best Regards,
Rui
Welcome to the nuBuilder forums!
Please register and login to view forums and other content only available to registered users.
Please register and login to view forums and other content only available to registered users.
Search Screen with different Edit Screens
-
- Posts: 177
- Joined: Tue Nov 15, 2011 2:24 pm
-
- Posts: 100
- Joined: Mon Jun 15, 2009 10:04 am
Re: Search Screen with different Edit Screens
one way to achieve what you need is to have the same form, but simply have display conditions on each object.
Assuming that the Asset Status is called asset_status in the database, the display condition needs an SQL result of either 0 or 1.
or
Assuming that the Asset Status is called asset_status in the database, the display condition needs an SQL result of either 0 or 1.
Code: Select all
SELECT IF('#asset_status#' < 1,'1','0')
Code: Select all
SELECT IF('#asset_status#' <> 1,'1','0')
-
- Posts: 177
- Joined: Tue Nov 15, 2011 2:24 pm
Re: Search Screen with different Edit Screens
Hi Shane,
I'm using:
But I have the error:
"SQL
SELECT IF('14f84453ade474' = 14fb0e1f28ca54,'1','0')
Transaction
No Transaction.
Error
1054: Unknown column '14fb0e1f28ca54' in 'field list'"
Any idea?
Thank You!
Rui
I'm using:
Code: Select all
SELECT IF('#unit_status_id#' = 14fb0e1f28ca54,'1','0')
"SQL
SELECT IF('14f84453ade474' = 14fb0e1f28ca54,'1','0')
Transaction
No Transaction.
Error
1054: Unknown column '14fb0e1f28ca54' in 'field list'"
Any idea?
Thank You!
Rui
BR
Rui
Rui
-
- Posts: 503
- Joined: Thu May 24, 2012 2:08 am
- Location: Milan, Italy
- Contact:
Re: Search Screen with different Edit Screens
ruiascensao ,
if you want to check the id (#unit_status_id#), maybe a solution could be:
Hope this helps.
if you want to check the id (#unit_status_id#), maybe a solution could be:
Code: Select all
SELECT IF('#unit_status_id#' = '14fb0e1f28ca54','1','0')
-
- Site Admin
- Posts: 2786
- Joined: Mon Jun 15, 2009 2:23 am
- nuBuilder Version: 4.5
- Been thanked: 3 times
Re: Search Screen with different Edit Screens
rui,
massiws is right, you simply forgot to put the ID in quotes (making it a string).
Steven
massiws is right, you simply forgot to put the ID in quotes (making it a string).
Steven
-
- Posts: 177
- Joined: Tue Nov 15, 2011 2:24 pm