on 04-04-2017 11:21 AM
Hello Experts,
I've got an incredible issue concerning optional prompts dynamic parameters on CR for Business one.
Indeed, i've created 4 optional prompts dynamic parameters. Unfortunately, 1 of them (the last it seems) is always not working.
When i move the last parameter on the formula, then the concerned parameter is working! And the "new" last one is not.
Is there any restrictions on Optional prompt parameter number?
FYI, formula used :
if not (hasvalue({?Statut})) then True else {OINV.DocStatus}={?Statut}
and if not (hasvalue({?Date})) then True else {OINV.DocDate}={?Date}
and if not (hasvalue({?@Select "CardName" from OCRD where "CardType"='C' order by "CardName"})) then True else {OCRD.CardName}={?@Select "CardName" from OCRD where "CardType"='C' order by "CardName"}
and (not HasValue({?@SELECT distinct T0."UserSign", T1."U_NAME" FROM OINV T0 INNER JOIN OUSR T1 ON T0."UserSign" = T1."USERID"}) OR {OINV.UserSign} = {?@SELECT distinct T0."UserSign", T1."U_NAME" FROM OINV T0 INNER JOIN OUSR T1 ON T0."UserSign" = T1."USERID"})
and {OINV.CANCELED}='N'
(in that case, Parameter on user is not working)
Hi Nicolas,
Please see if this code works:
(not (hasvalue({?Statut})) OR {OINV.DocStatus}={?Statut})
AND
(not (hasvalue({?Date})) OR {OINV.DocDate}={?Date})
AND
(not (hasvalue({?@Select "CardName" from OCRD where "CardType"='C' order by "CardName"})) OR {OCRD.CardName}={?@Select "CardName" from OCRD where "CardType"='C' order by "CardName"})
AND
(not HasValue({?@SELECT distinct T0."UserSign", T1."U_NAME" FROM OINV T0 INNER JOIN OUSR T1 ON T0."UserSign" = T1."USERID"}) OR {OINV.UserSign} = {?@SELECT distinct T0."UserSign", T1."U_NAME" FROM OINV T0 INNER JOIN OUSR T1 ON T0."UserSign" = T1."USERID"})
AND {OINV.CANCELED}='N'
Also, while in the formula editor, look for an option on the top that says 'Exceptions for Nulls'; change that to 'Default Values for Nulls'
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ian,
Thanks for update, theses 2 fields allows my customer to have a "Name Description" rather than a code for UserSign. I don't think it is link to my problem because the problem can arrive on any other Dynamic Parameter, depending on their position.
But thanks a lot !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You appear to have two fields in the last select
SELECT distinct T0."UserSign", T1."U_NAME"
Should it only have one
SELECT distinct T0."UserSign"
Ian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.