About define columns in a condition to Browse

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
jparada
Posts: 226
Joined: Fri Jan 23, 2009 5:18 pm

About define columns in a condition to Browse

Post by jparada » Thu Feb 26, 2009 4:33 am

Translated by Google

Hi,
I'm trying to use a condition in the definition of columns in a browser, I try something like this:
FIELDS ( 'Clientes-> f_nomb_cte', 'Clientes-> f_tel1', 'Clientes-> f_sald_act' If (! Empty (Clientes-> f_ult_mvto), 'FechaLegible (Clientes-> f_ult_mvto)', 'Sin Movimientos')) ;

I have two situations, the first error is that mark that I can not find the alias, if I put the condition, and if I did not throw off the error, and the second is that I do not give the expected result with the condition, say, if the date field is empty, is displayed " / / " and not the legend "Sin Movimientos".

Any suggestions?.

Thanks

Greetings
Javier

User avatar
mol
Posts: 2977
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 158 times
Been thanked: 85 times
Contact:

Post by mol » Thu Feb 26, 2009 12:40 pm

jparada wrote:Translated by Google

Hi,
I'm trying to use a condition in the definition of columns in a browser, I try something like this:
FIELDS ( 'Clientes-> f_nomb_cte', 'Clientes-> f_tel1', 'Clientes-> f_sald_act' If (! Empty (Clientes-> f_ult_mvto), 'FechaLegible (Clientes-> f_ult_mvto)', 'Sin Movimientos')) ;

I have two situations, the first error is that mark that I can not find the alias, if I put the condition, and if I did not throw off the error, and the second is that I do not give the expected result with the condition, say, if the date field is empty, is displayed " / / " and not the legend "Sin Movimientos".

Any suggestions?.

Thanks

Greetings
Javier
I think, that should look like that (changes marked with red colour) :
FIELDS ( 'Clientes-> f_nomb_cte', 'Clientes-> f_tel1', 'Clientes-> f_sald_act' , "If (! Empty (Clientes-> f_ult_mvto), 'FechaLegible (Clientes-> f_ult_mvto)', 'Sin Movimientos')" )

with regards, Marek

jparada
Posts: 226
Joined: Fri Jan 23, 2009 5:18 pm

Post by jparada » Thu Feb 26, 2009 3:35 pm

Translated by Google.

Thanks for answering, I only had to remove the commas where they simply call the function like so: "If (! Empty (Clientes->f_ult_mvto),FechaLegible (Clientes-> f_ult_mvto), 'Sin Movimientos')"

Thanks

Greetings
Javier

User avatar
mol
Posts: 2977
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Has thanked: 158 times
Been thanked: 85 times
Contact:

Post by mol » Thu Feb 26, 2009 7:06 pm

Of course, I didn't saw them...
It's really hard to analyze not own programs...

Post Reply