Steeve Gilbert <[EMAIL PROTECTED]> wrote:Maybe the %1 and %2 need to be quoted. Have you tried that?
("((createdBy == \"%1\") || (modifiedBy == \"%2\"))"
Steeve...
-----Message d'origine-----
De : development-axapta@yahoogroups.com [mailto:[EMAIL PROTECTED] De la part de Lee Yacovett
Envoyé : 7 juin 2005 08:50
À : development-axapta@yahoogroups.com
Objet : RE: [development-axapta] Query Range
I trid to use this, but I get an "Unable to parse the value" error. I figured this was hw to fix this problem, but I can't figure out the syntax. I also tried adding prodtable. before the ranges, but I got the same error.
Erik Hansen <[EMAIL PROTECTED]> wrote:Hi,
It's possible to write this 'or' in a queryRange.
QueryRange = this.Query().DataSourceNo(1).AddRange(fieldNum(prodTable,
createdby));
QueryRange.Value(strfmt("((createdBy == %1) || (modifiedBy == %2))",
curUserId(), curUserId()));
Best regards
Erik
________________________________
From: development-axapta@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of yacovett_lee
Sent: 6. juni 2005 21:12
To: development-axapta@yahoogroups.com
Subject: [development-axapta] Query Range
I am overriding the prodtable_ds query on the prodtable form. I would
like to filter out the results for only the person logged in user
curusrid(). To do this I am trying to select all records where
prodtable.createdby == curusrid() || prodtable.modifiedby == curusrid
().
I basically have 2 questions:
1. Is this the best way to do this, or should I be looking elsewhere
to filter my results.
2. If this is the best way, can this be done at all? The problem I am
having is that when I append a range to the query it automatically
appends it and an "and" instead of an "or".
I want the query to be equvalent to
prodtable.createdby == curusrid() || prodtable.modifiedby == curusrid()
but instead the default value is this:
prodtable.createdby == curusrid() && prodtable.modifiedby == curusrid()
Is there any way for me to have an or for these two fields ??
Thanks.
________________________________
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]
be>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
[Non-text portions of this message have been removed]
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Discover Yahoo!
Find restaurants, movies, travel & more fun for the weekend. Check it out!
[Non-text portions of this message have been removed]
Yahoo! Groups Links
---------------------------------
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
Discover Yahoo!
Find restaurants, movies, travel & more fun for the weekend. Check it out!
[Non-text portions of this message have been removed]
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.