Re: Java API question - how to save a filter
(Found my own answer) -- actually - walked away from the computer -- did some dishes -- then thought uggg - the user needs to save it -- not the filter itself… Often the best way to solve a problem - is to walk away from the computer. My wife would say -- would be to do some dishes :) user.setFilter(f) UG -- sorry for the wasted post. -John On Sat, Apr 7, 2012 at 4:10 PM, John Sundberg john.sundb...@kineticdata.com wrote: Java ARS API 7.6 Any idea how to save a filter…. f = user.getFilter(SomeSampleFilter) f.setHelpText(John was here) f.save ??? f.commit ??? f. I looked through the docs -- couldn't find anything …. I may have totally missed it. ??? -John -- *John Sundberg* Kinetic Data, Inc. Your Business. Your Process. *WWRUG10 Best Customer Service/Support Award* *WWRUG09 Innovator of the Year Award* * * 651-556-0930 I john.sundb...@kineticdata.com www.kineticdata.com I community.kineticdata.com -- *John Sundberg* Kinetic Data, Inc. Your Business. Your Process. *WWRUG10 Best Customer Service/Support Award* *WWRUG09 Innovator of the Year Award* * * 651-556-0930 I john.sundb...@kineticdata.com www.kineticdata.com I community.kineticdata.com ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org attend wwrug12 www.wwrug12.com ARSList: Where the Answers Are
Re: Java API Question
http://www.mail-archive.com/arslist@arslist.org/msg26634.html Axton Grams The opinions, statements, and/or suggested courses of action expressed in this E-mail do not necessarily reflect those of BMC Software, Inc. My voluntary participation in this forum is not intended to convey a role as a spokesperson, liaison or public relations representative for BMC Software, Inc. On Wed, Jan 28, 2009 at 12:00 AM, Lyle Taylor tayl...@ldschurch.org wrote: ** Hi All, I'm trying to get started using the Java API and am running into something I don't understand. I have the following code that simply queries CMT:People for everybody that has Unrestricted Access: ARServerUser srv = *new* ARServerUser(user, password, * null*, server, port); *try* { srv.login(); *int* fields[] = {1, 4}; OutputInteger nMatches = *new* OutputInteger(); ListEntry entries = srv.getListEntryObjects( CTM:People, srv.decodeQualification('Unrestricted Access' != $NULL$), 0, 0, *null*, fields, *false*, nMatches); *if* ( nMatches.intValue() 0 ) { *for* (Entry entry : entries) { String *id* = entry.getEntryId(); String *str* = entry.toString(); } } } *catch* (ARException e) { e.printStackTrace(); } The code compiles fine and runs but throws an exception when it tries to decode the qualification string. I get the following error: ERROR (402): Incorrect format in the definition file; (missing cond op -- 'Unrestricted Access' != $NULL$) If I understand correctly, the qualification shouldn't need a conditional operator, a relational operator should be just fine. If I remove the qualification and simply pass null, it works without any errors. Has anyone seen this error before and have an idea of what I might be doing wrong or missing? Let me know if I need to provide more information. Thanks, Lyle Taylor NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. __Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are html___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are
Re: Java API Question
Excellent! Thanks. Switching to parseQualification rather than decodeQualification fixed it. Thanks, Lyle From: Action Request System discussion list(ARSList) [mailto:arsl...@arslist.org] On Behalf Of Axton Sent: Tuesday, January 27, 2009 11:49 AM To: arslist@ARSLIST.ORG Subject: Re: Java API Question ** http://www.mail-archive.com/arslist@arslist.org/msg26634.html Axton Grams The opinions, statements, and/or suggested courses of action expressed in this E-mail do not necessarily reflect those of BMC Software, Inc. My voluntary participation in this forum is not intended to convey a role as a spokesperson, liaison or public relations representative for BMC Software, Inc. On Wed, Jan 28, 2009 at 12:00 AM, Lyle Taylor tayl...@ldschurch.orgmailto:tayl...@ldschurch.org wrote: ** Hi All, I'm trying to get started using the Java API and am running into something I don't understand. I have the following code that simply queries CMT:People for everybody that has Unrestricted Access: ARServerUser srv = new ARServerUser(user, password, null, server, port); try { srv.login(); int fields[] = {1, 4}; OutputInteger nMatches = new OutputInteger(); ListEntry entries = srv.getListEntryObjects(CTM:People, srv.decodeQualification('Unrestricted Access' != $NULL$), 0, 0, null, fields, false, nMatches); if ( nMatches.intValue() 0 ) { for (Entry entry : entries) { String id = entry.getEntryId(); String str = entry.toString(); } } } catch (ARException e) { e.printStackTrace(); } The code compiles fine and runs but throws an exception when it tries to decode the qualification string. I get the following error: ERROR (402): Incorrect format in the definition file; (missing cond op -- 'Unrestricted Access' != $NULL$) If I understand correctly, the qualification shouldn't need a conditional operator, a relational operator should be just fine. If I remove the qualification and simply pass null, it works without any errors. Has anyone seen this error before and have an idea of what I might be doing wrong or missing? Let me know if I need to provide more information. Thanks, Lyle Taylor NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. __Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are html___ __Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are html___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are
Re: Java API Question
I agree with Axton...you are likely looking for parseQualification, not decode http://arswiki.org/dist/ars/docs/ARS/7.1/com/bmc/arsys/api/ARServerUser.html #parseQualification(java.lang.String,%20java.lang.String) _ From: Action Request System discussion list(ARSList) [mailto:arsl...@arslist.org] On Behalf Of Lyle Taylor Sent: Tuesday, January 27, 2009 11:30 AM To: arslist@ARSLIST.ORG Subject: Java API Question ** Hi All, I'm trying to get started using the Java API and am running into something I don't understand. I have the following code that simply queries CMT:People for everybody that has Unrestricted Access: ARServerUser srv = new ARServerUser(user, password, null, server, port); try { srv.login(); int fields[] = {1, 4}; OutputInteger nMatches = new OutputInteger(); ListEntry entries = srv.getListEntryObjects(CTM:People, srv.decodeQualification('Unrestricted Access' != $NULL$), 0, 0, null, fields, false, nMatches); if ( nMatches.intValue() 0 ) { for (Entry entry : entries) { String id = entry.getEntryId(); String str = entry.toString(); } } } catch (ARException e) { e.printStackTrace(); } The code compiles fine and runs but throws an exception when it tries to decode the qualification string. I get the following error: ERROR (402): Incorrect format in the definition file; (missing cond op -- 'Unrestricted Access' != $NULL$) If I understand correctly, the qualification shouldn't need a conditional operator, a relational operator should be just fine. If I remove the qualification and simply pass null, it works without any errors. Has anyone seen this error before and have an idea of what I might be doing wrong or missing? Let me know if I need to provide more information. Thanks, Lyle Taylor NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. __Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are html___ ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: RMI Solutions ARSlist: Where the Answers Are
Re: Java API Question
It is probably not necessary to check beforehand if a field with the same ID doesn't exist. If it does, the create function should fail and throw an exception (most likely ARERR 407, Duplicate field or VUI-ID in the definition), which your program then might catch and handle somehow. Regards, Thilo Stapff Phil Murnane wrote: I'm using the 7.1 Java API to create a new field on a form. Be All: I'm using the 7.1 Java API to create a new field on a form. Before creating the field, I'd like to make sure a field with the same Field ID does not already exist. I found the isPresent() method of the Field object in the javadocs, but since a generic Field cannot be instantiated (must use CharacterField or IntegerField, etc), how do I use isPresent() to check for any type existing field with a given Field ID? Do I have to first check for an AttachmentField, then check for an AttachmentPoolField, then check for a CharacterField, etc? Sorry if this is a dumb question -- I'm new at this OO programming stuff. TIA, --Phil ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are
Re: Java API Question
Phil, I think your looking in the wrong class... com.bmc.arsys.api.ARServerUser.getField(String form, int fieldId) In this case I think you want the getField to throw an com.bmc.arsys.api.ARException ( if object is not loaded) then you add the field you want in the catch block. :) HTH. -- Carey Matthew Black Remedy Skilled Professional (RSP) ARS = Action Request System(Remedy) Love, then teach Solution = People + Process + Tools Fast, Accurate, Cheap Pick two. On Mon, Nov 24, 2008 at 12:12 PM, Phil Murnane [EMAIL PROTECTED] wrote: I'm using the 7.1 Java API to create a new field on a form. Be All: I'm using the 7.1 Java API to create a new field on a form. Before creating the field, I'd like to make sure a field with the same Field ID does not already exist. I found the isPresent() method of the Field object in the javadocs, but since a generic Field cannot be instantiated (must use CharacterField or IntegerField, etc), how do I use isPresent() to check for any type existing field with a given Field ID? Do I have to first check for an AttachmentField, then check for an AttachmentPoolField, then check for a CharacterField, etc? Sorry if this is a dumb question -- I'm new at this OO programming stuff. TIA, --Phil ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are
Re: Java API Question
If you would like to get a list of existing Field ID's on a form you want to look to your ARServerUser object and use the method getListField. You would want to use the form and the constant Constants.AR_FIELD_TYPE_ALL leaving the 3rd parameter either non existent, or set it to 0 -Original Message- From: Action Request System discussion list(ARSList) [mailto:[EMAIL PROTECTED] On Behalf Of Phil Murnane Sent: Monday, November 24, 2008 10:12 AM To: arslist@ARSLIST.ORG Subject: Java API Question I'm using the 7.1 Java API to create a new field on a form. Be All: I'm using the 7.1 Java API to create a new field on a form. Before creating the field, I'd like to make sure a field with the same Field ID does not already exist. I found the isPresent() method of the Field object in the javadocs, but since a generic Field cannot be instantiated (must use CharacterField or IntegerField, etc), how do I use isPresent() to check for any type existing field with a given Field ID? Do I have to first check for an AttachmentField, then check for an AttachmentPoolField, then check for a CharacterField, etc? Sorry if this is a dumb question -- I'm new at this OO programming stuff. TIA, --Phil ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are ___ UNSUBSCRIBE or access ARSlist Archives at www.arslist.org Platinum Sponsor: www.rmsportal.com ARSlist: Where the Answers Are