Quantcast
Channel: Dynamics User Group
Viewing all articles
Browse latest Browse all 15740

Conditional filtering in C/AL

$
0
0

Hello,

Firstly apologies if I am in the wrong forum first time posting!

I have a dilemma with how a dataport is currently running which I am hoping someone might be able to help me with.

Currently when I user wants to export daily price information a dataport runs which collects all the relevant pricing info from table "FDR Fund Price" providing that the "Prices Authorised" field is set to TRUE. However we recently added two new funds which will not be authorised at the time the dataport runs to extract the info. This is causing the code to fail with the error "All prices must be authorised".

I think that the problem is in this filter:

 "FDR Fund Price".SETFILTER("Prices Authorised",'= YES')

But what I need to be able to do is select all the relevant price info that is authorised with the exception of the two new funds. Essentially a conditional filter.

I was toying with the idea of something along the lines of:

 

 IF

  "FDR Fund Code"."Fund Code" <> 'AH%'

 THEN

 BEGIN

 "FDR Fund Price".SETFILTER("Prices Authorised",'= YES')

 END;

Obviously this isn't correct syntactically and most certainly logically so my question is has anyone encountered this type of issue and if so would you be able to point me in the right direction.

Any help would be gratefully received.

Kind regards,

Neil


Viewing all articles
Browse latest Browse all 15740

Trending Articles