About define columns in a condition to Browse

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

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

About define columns in a condition to Browse

Post by jparada »

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: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: About define columns in a condition to Browse

Post by mol »

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: 430
Joined: Fri Jan 23, 2009 5:18 pm

Re: About define columns in a condition to Browse

Post by jparada »

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: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: About define columns in a condition to Browse

Post by mol »

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