Nevermind....Got it...:)....This is for anyone else who wants to do
something similar

Here is some basics just to help you out below...I have a form with 4
fields...Form, Query, Field, Value, these represent the form I want to
update, the query I want to perform to do the update, the field I want to
update, and the value I want to change that field to.

Application-Parse-Qual "$Form$" $Query$

This verifies that the form and qualification specified works...you can
easily throw the results away...

Application-Map-Names-To-Ids "$Form$" $$Field$$ 

The second set of $ around $Field$ makes it look for that field...I don't
want to have the $ around my field in my record...so I added it in the
Filter...this gives me the Field ID of the field in question...which I use
in the next statement

Application-Parse-Val-SField "$Form$" $Field ID$ "$Form$" $Value$

This turns a set/push action into an internal representation...which I don't
really care about...but if it errors out that means that if doing a setfield
on 'current form' to the field I specified in the above filter to the value
specified is invalid.  

So with these three filters, or I guess...3 actions in a single filter, I
can verify that all 4 pieces of my record are valid options....which will
hopefully ensure that my external program won't bomb because any one of them
isn't 100% accurate.

Oh...and in case anyone is wondering why I'm doing this....I need to be able
to set a dynamic field, on a dynamic form with a dynamic value.  I can't do
this with advanced workflow because the field ID can't be
dynamic...:)...just working around limitations of the app....this will allow
me to specify via workflow what form I want the update to be performed on,
with what qual, and set a dynamic field with a verified valid value....very
nice...because I was doing this through direct SQL previously...which I
didn't like doing.

-----Original Message-----
From: LJ Longwing [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 04, 2008 5:06 PM
To: [email protected]
Subject: Verify Query and Field values

I'm working on a console that will allow for updates of data through an
external program.  I would like to verify that the Form, Query, Field, and
Field value that they are choosing are valid before I call my external
program.  I found this runprocess that allows me to validate the Query

Application-Parse-Qual "<form>" <qualification_string>

This verifies that the Form and Qualification string are valid by converting
them to an 'internal representation'...which I don't actually want...but it
serves my purposes at the moment....what I can't find is verification that
the field they have specified to update, and the value they want to put in
it are valid and won't violate any rules that Remedy has in place.  For
example if I have a selection field with values No/Yes, and they specify
that field, I would like to throw an error if they specify that they want to
set it to 'Heck Yes'....or if they are wanting to set a Character field with
200 characters, but the field has a limit of 50, my program will error when
trying to set it, guaranteed...but I want to catch it before I call my
external program.  Any suggestions?

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor: www.rmsportal.com ARSlist: "Where the Answers Are"

Reply via email to