Discount Visible-field
Chi Fai Cheung
Hi all,I have the following problem.
When the discount-field in the row of the marketing documents are not filled then the label text of Discount (in the header) must not be visible in the layout.
Also i have create an UDF-field ('U_PPI') with value 'Y' or 'N'.
So when the UDF-field (U_PPI) is 'Y' then is it visible and when the value is 'N' not visible.
In the textfield i have the value in the visible-field:
Document("U_PPI") = "Y" AND DocumentRow("DiscPrcnt") <> "0.00"
But when i filled the discount in the 3rd row e.g. then the text isn't visible in the layout.
Thanks in advance,
Chi Fai
Attachment
[url=http://www.coresystems.ch/wp-content/../wp-content/forum-image-uploads/vicichief/visible_field.JPG]visible_field.JPG[/url]
Philipp Knecht
Hi Chi FaiIMO you do not need to use UDF's
You can Issue a Query Like : LD.QueryDataNum("SELECT MAX(Discount) FROM @@RDR1 WHERE DocEntry = " & DocEntry)
Then if it's greater 0 the document has dicount elsewise not.
hth
Chi Fai Cheung
[quote]"Philipp"]Hi Chi Fai
IMO you do not need to use UDF's
You can Issue a Query Like : LD.QueryDataNum("SELECT MAX(Discount) FROM @@RDR1 WHERE DocEntry = " & DocEntry)
Then if it's greater 0 the document has dicount elsewise not.
hth
[/quote]
Hi Philipp,
Thank you replying me.
The UDF is necessary because the user can choose if the columns want to visible or not. If the UDF is choosing 'Yes' then columns (quantity, discount, price and total price) will be visible. Also when there's no discount filled in then the Discount colomns must not be visible.
When i put the query you giving to me i have put in the 'Visible'-field, but its still doesn't work.
Thanks,
Chi Fai
Philipp Knecht
Hi Chi FaiOk.
Of course you need to adjust the query. It was an idea how to solve it.
So in your case in the visible prop:
TheLDQueryThing > 0
hth
Chi Fai Cheung
[quote]"Philipp"]Hi Chi Fai
Ok.
Of course you need to adjust the query. It was an idea how to solve it.
So in your case in the visible prop:
TheLDQueryThing > 0
hth
[/quote]
Ok Philipp,
Thanks. I have the following:
Document("U_PPI") = "Y" AND LD.QueryDataNum("SELECT DiscPrcnt FROM @@RDR1 WHERE DiscPrcnt > 0")
And it's seems to work. Thank you.
Philipp Knecht
Hi Chi FaiUse:
...
Document("U_PPI") = "Y" AND LD.QueryDataNum("SELECT MAX(DiscPrcnt) FROM @@RDR1 WHERE DocEntry = " & Document("DocEntry"))>0
...
hth
Chi Fai Cheung
[quote]"Philipp"]Hi Chi Fai
Use:
...
Document("U_PPI") = "Y" AND LD.QueryDataNum("SELECT MAX(DiscPrcnt) FROM @@RDR1 WHERE DocEntry = " & Document("DocEntry"))>0
...
hth
[/quote]
Thanks Philipp.
0
Please sign in to leave a comment.
Comments
0 comments