SetFocus dynamic with string

Hi,
in an adobe form the Focus can be set with xfa.host.setFocus("Formfield").  In this case 'Formfield' is a hardcoded form field.
Is it also possible to set the focus dynamic with a string, which contains the fieldname?
e.g.
myField = myNode.value;
var hochkomma = '"';
var Formfield = hochkomma.concat(myField);
var Formfield = Formfield.concat(hochkomma);
xfa.host.setFocus(Formfield);
But this code doesn't work. Where's the problem?
Thx!

Hi Andreas,
try to put Formfield between "", that is :
xfa.host.setFocus("Formfield");
And Formfield has to be the same as the name field, be careful respecting upper/lower case.
Regards.

Similar Messages

  • How to create dynamic connection string with variables using ssis.

    Hello,
    Can anyone let me know on how to create dynamic connection string with variables using ssis?
    Any help would be appreciated.

    Hi vinay9738,
    According to your description, you want to connect multiple database from multiple servers using dynamic connection.
    If in this case, we can create a Table in our local database (whatever DB we want) and load all the connection strings.  We can use Execute SQL Task to query all the connection strings and store the result-set in a variable of object type in SSIS package.
    Then use ForEach Loop container to shred the content of the object variable and iterate through each of the connection strings. And then Place an Execute SQL task inside ForEach Loop container with the SQL statements we have to run in all the DB instances. 
    For more details, please refer to the following blog:
    http://sql-developers.blogspot.kr/2010/07/dynamic-database-connection-using-ssis.html
    If there are any other questions, please feel free to let me know.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • For loops and dynamic sql string syntax

    Hi
    is there a why to loop through a dynamic sql string
    normally you would have
    FOR cur IN (select * from emp) LOOP
    but I have a dynamic sql string called l_sql
    I have tried the following
    FOR cur IN l_sql LOOP
    but I get
    PLS-00456: item 'L_SQL' is not a cursorCompilation failed
    Any ideas?

    You will need to use ref cursors and the OPEN v_rc FOR '<your sql string'> and then loop through it as you would with any other OPEN, LOOP, EXIT WHEN, END LOOP syntax

  • Load JDBC-Driver dynamically with JarClassLoader

    Hey!
    I have a problem loading JDBC drivers dynamically with a JarClassLoader:
    Code:
    public class URLLoaderTest {
      public static void main(String[] args) {
      try {
        URL[] urlList = {new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\mssqlserver.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msbase.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msutil.jar").toURL()};
        ClassLoader classLoader = new URLClassLoader(urlList);
        Class c = Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver",true,classLoader);
        Object d = c.newInstance();
        DriverManager.registerDriver((Driver)d);
        // DriverManager.getDrivers()    Enumeration is empty
        Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://Server:1433","test","test");
        DatabaseMetaData meta = conn.getMetaData();
        System.out.println("JDBC driver version is " + meta.getDriverVersion());
      catch (Exception e) {System.out.println(e.getMessage());}
    }Problem:
    Till the DriverManager registraton everything is ok.
    The registerDriver Method throws no exception but if I call DriverManager.getDrivers() after calling the registerDriver Method an empty Enumeration is returned.
    So the driver is not loaded and DriverManager.getConnection throws an Exception (no suitable driver).
    If I include the driver jars into the Classpath everything is running (but that isn't what I want to do).
    Is there a solution for this problem? Maybe it is possible to load the data into the AppClassLoader??!!
    Thanx in advance.

    Found a solution!
    For everyone who is interested:
    public class URLLoaderTest {
      public static void main(String[] args) {
      try {
        URL[] urlList = {new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\mssqlserver.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msbase.jar").toURL(),
                         new File("D:\\jbuilder5\\SQLServerJDBC\\lib\\msutil.jar").toURL()};
        ClassLoader classLoader = new URLClassLoader(urlList);
        Class c = Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver",true,classLoader);
        Object d = c.newInstance();
        Driver driver = (Driver)d;
        Properties prop = new Properties();
        prop.setProperty("user","test");
        prop.setProperty("password" ,"test");
        Connection conn = driver.connect("jdbc:microsoft:sqlserver://test:1433",prop);
        System.out.println("JDBC driver version is " + meta.getDriverVersion());
      catch (Exception e) {System.out.println(e.getMessage());}
    }

  • Report model dynamic connection string

    hi 
    I'm trying to build a report model,which has to connect to different database 
    For ex:
    I've 10 different customers, and i need to connect the selected customer database, 
    Any thoughts how to proceed in this 
    Thanks
    Chezhian 

    Hi Chezhian,
    As per my understanding, I would try the two methods to achieve your requirement: create one report model which contains those databases or create 10 report model, the data source can connect to the corresponding model based on the user. In Reporting Services,
    a report model can only map to a database. So the first method doesn’t work. If we want to connect to a report model, we should browse to a report server or SharePoint site and select a published model. We don’t need a connection string to use a report model
    as a data source. So the second method still doesn’t work.
    To work around the issue, I think we can create 10 report model, each report model corresponding each user’s database and named the user name. Then set Item-Level Permissions of each report model based on the user on report manager. Each user can only see
    his own report model on the report server.
    Or we can create a data source with dynamic connection string, the blog below is for your reference:
    http://blogs.msdn.com/b/bimusings/archive/2006/07/20/673051.aspx
    References:
    Report Model Connection (SSRS)
    Setting Item-Level Permissions on a Report Server
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Creating value expression​s dynamicall​y with strings and numbers?

    Hello everybody!
    I'm having a problem regarding passing arguments (DLL-Adapter) from different locations to a function in TestStand 3.5.
    Here is what I have:
    FileGlobals.Data.MyArray
    and
    StationGlobals.Data.MyArray
    Which means there are 2 arrays of the same type, one stored in the sequence and one globally. "Data" is just a container.
    The type of MyArray is a custom one each element containing a string and a number: Array[n].Name and Array[n].Nr
    Now I want to pass (string) arguments of the array to a function using a value expression of: FileGlobals.Data.MyArray[Step.index].Name
    Whereas Step.index is a local property (number) of a custom step. It's working well!
    Here is the actual problem:
    Since I have to sources, FileGlobals OR StationGlobals, I want to specify dynamically which string to pass.
    Therefore I introduced a property Step.ThisIsMyScope . It's a string containing either "FileGlobals" or "StationGlobals".
    I have been experimenting in expressions like
    Step.ThisIsMyScope + ".Data.MyArray[" + Step.index + "].Name"
    or Evaluate(...) , etc.
    Nothing worked.
    I do not want to use the API, though I managed to do things with getValString and temporary saving the Value in the step, but that's not nice nor transparent enough.
    May anyone help me?
    Thank you very much,
    Stefan

    Hi,
    have you tried Evaluate(Step.ThisIsMyScope + ".Data.MyArray[" + Step.index + "].Name")
    or
    (Step.ThisIsMyScope == "FileGlobals"  )  ?  (FileGlobals.Data.MyArray[ Step.index].Name)  :  (StationsGlobals.Data.MyArray[ Step.index].Name)
    Regards
    Ray Farmer
    Message Edited by Ray Farmer on 04-05-2007 10:09 AM
    Regards
    Ray Farmer

  • DataGrid dynamically with a Repeater

    Hello,
    I would like to create a DataGrid component that is created
    dynamically with the help of a Repeater array.
    I gave up my first approach using directly a
    <mx:Repeater> tag within the DataGridColumns:
    Code:
    <mx:DataGrid ..>
    <mx:columns>
    <mx:Repeater id="rp" datProv="{data}"...>
    <mx:DataGridColumn dataField="{rp.currentItem.dataField}"
    .... />
    </mx:Repeater>
    </mx:columns>
    </mx:DataGrid>
    This kind of recurive structure isn't allowed.
    then I tried to resolve my problem by using an ActionScript
    generator, but because of a lack of example code, I don't know
    what's wrong with it:
    Code:
    <mx:DataGrid xmlns:mx="
    http://www.adobe.com/2006/mxml"
    columns="{repeaterArray}" initialize="initApp()"...>
    <mx:Script>
    <![CDATA[
    import mx.controls.dataGridClasses.DataGridColumn;
    public function initApp():void {
    repeaterArray = new Array();
    for (var c:Number = 0;c < ids.length;c++) {
    var newObj:DataGridColumn = new DataGridColumn(null);
    newObj.dataField = String(ids[c]);
    newObj.headerText = String(headers[c]);
    newObj.width = Number(widths[c]);
    repeaterArray.push(newObj);
    ]]></mx:Script>
    </mx:DataGrid>
    ids, headers, width are passed arrays with needed Strings,
    bzw. Numbers. It doesn't work although there is neither an compiler
    nor a debug error.
    I also dunno if I should use the initialize or
    creationComplete - event or another one?
    Does anybody know how I use the Repeater in this case
    correctly or build a working ActionScript generator?
    Thank you.

    I just forgot:
    this.columns = repeaterArray;
    Jesus Christ.

  • Array access notation with strings?

    I may be confused, but I thought you could use array access
    notation with strings. Can someone tell me why this code doesn't
    work (or suggest new code):
    the code is meant to rewrite the block of text in tText at a
    rate of one character per frame... (when the function is called
    once per frame) but it doesn't work.

    DZ-015,
    > I may be confused, but I thought you could use
    > array access notation with strings.
    It's made for objects, actually. The array access operator,
    [], allows
    you to access elements from an Array instance and also lets
    you access
    properties from any sort of object. The "trick" it provides,
    in this latter
    case, is that you can refer to these properties -- within the
    brackets --
    with strings, so it's often used to reference objects
    dynamically.
    > var sWorkingText:String = tText.text;
    Here you've declared a String variable and set it to the
    TextField.text
    property of some textfield. So far, so good.
    > var sNewText:String = oPhotoText[sPageFocus];
    Here, you've declared a String variable, but it seems that
    you're
    setting it to a property of the oPhotoText object. That's now
    how this
    works.
    The array access operator allows you to *use* strings to get
    at an
    object's properties:
    // functionally equivalent
    someObject.property1
    someObject["property" + 1];
    var x:Number = 1;
    someObject["property" + x];
    Does that help?
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."

  • How to select column dynamically with sharepoint list as data source in ssrs report

    Hi all,
    I am creating reports from SharePoint list but i have requirements to select the column name dynamically with SharePoint list as data source. I didn't find any way of doing this.. 
    Can anyone help me to resolve this issue..
    There is no way of specifying column name dynamically here in data set query
    <RSSharePointList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <ListName>test list</ListName>
      <ViewFields>
        <FieldRef Name="ID" />
        <FieldRef Name="ContentType" />
        <FieldRef Name="Title" />
        <FieldRef Name="Modified" />
        <FieldRef Name="Created" />
        <FieldRef Name="Author" />
        <FieldRef Name="Editor" />
        <FieldRef Name="_UIVersionString" />
        <FieldRef Name="Attachments" />
        <FieldRef Name="Edit" />
        <FieldRef Name="LinkTitleNoMenu" />
        <FieldRef Name="LinkTitle" />
        <FieldRef Name="DocIcon" />
        <FieldRef Name="ItemChildCount" />
        <FieldRef Name="FolderChildCount" />
        <FieldRef Name="test_x0020_date" />
        <FieldRef Name="title2" />
      </ViewFields>
    </RSSharePointList>

    Hi MNRSPDev,
    Sorry for the delay.
    According to the current description, I understand that you want to specify column name in dataset query designer dynamically when using SharePoint list data source.
    Based on my research, this is not supported by default. As a workaround, you can use XML data source. The XML content can be embedded directly within the query. This lets you use the expression capabilities within the processing engine to build queries and
    data dynamically within the report. And it can be used for retrieving XML data directly from an external data source, passing it using parameters, and embedding it within the query.
    Reference:
    http://www.codeproject.com/Articles/56817/Dynamic-Reports-with-Reporting-Services
    Hope this helps.
    Regards,
    Heidi Duan
    Heidi Duan
    TechNet Community Support

  • Urgent!!!!!! Issue with String in CO

    Hi All,
    I am learner of OAF.
    I have issue with string while converting into double.
    In AM,
    public String ComputeMarginPercent()
    retrun form.format((55570.0*100)/184.64999999999418);
    in CO..I am getting the value:
    String s1 = (String)oapagecontext.getApplicationModule(oawebbean).invokeMethod("computeMarginPercent");
    here getting value of s1=30,094.77
    I need to convert s1 to double, while converting double its raising error.
    how can I remove comman in (30,094.77) this number..?
    please advise me ..

    Hi Pratap,
    I am new to java ..
    Can you please tell me in step by step..?
    Thanks in advance
    I tried like /..
    String str= "30,094.77 ";
    char[] chars = str.toCharArray();
    String s = String.copyValueOf(chars);
    System.out.println(s);
    Still displaying value as 30,094.77 (with comma)
    Edited by: user633508 on Nov 21, 2008 2:55 AM

  • Problem with String variable

    I am new to Java Programming.
    I have a line of code that works and does what is supposed to.
    faceData.getProfile("Lisa").removeFriend("Curtis");
    If I assign the strings to variables such as-
    String name = "Lisa";
    String fName = "Curtis";
    and then plug those into the same line of code, it does not work
    faceData.getProfile(name).removeFriend(fName);
    What could be causing the problem?
    I even added some lines to print out what is stored in the variables to verify that they are what they should be, but for some reason the variables do not work while putting the strings in quotes does. Any ideas?

    I guarantee that something about your assertions are incorrect. Those variables are either not equal to the values you claim, or something else is going on. But it's not a problem with string variables versus string constants.
    Edit: My best guess in lack of a real example from you, is that the strings in question have non-printable characters in them, such as trailing spaces or line feeds.

  • Little problem with Strings.

              I have an little problem with Strings, i make one comparision like this.
              String nombre="Javier";
              if( nombre.equalsIgnoreCase(output.getStringValue("CN_NOMBRESf",null)) )
              Wich output.getStringValue("CN_NOMBRESf",null) is "Javier" too, because I display
              this before and are equals.
              What I do wrong?.
              

    You are actually making your users key in things like
    "\026"? Not very user-friendly, I would say. But
    assuming that is the best way for you to get your
    input, or if it's just you doing the input, the way to
    change that 4-character string into the single
    character that Java represents by '\026', you would
    use a bit of code like this:char encoded =
    (char)Integer.parseInt(substring(inputString, 1),
    16);
    DrClap has the right idea, except '\026' is octal, not hex. So change the radix from 16 to 8. Unicode is usually represented like '\u002A'. So it looks like you want:String s = "\\077";
    System.out.println((char)Integer.parseInt(s.substring(1), 8));Now all you have to do is parse through the String and replace them, which I think shouldn't be too hard for you now :)

  • Regex with strings that contain non-latin chars

    I am having difficulty with a regex when testing for words that contain non-latin characters (specifcally Japanese, I haven't tested other scripts).
    My code:
    keyword = StringUtil.trim(keyword);
    //if(keywords.indexOf(keyword) == -1)
    regex = new RegExp("\\b"+keyword+"\\s*;","i");
    if(!regex.test(keywords))
    {Alert.show('"'+keywords+'" does not contain "'+keyword+'"'); keywords += keyword + "; ";}
    Where keyword is
    日本国
    and keywords is
    Chion-in; 知恩院; Lily Pond; Bridge; 納骨堂; Nōkotsu-dō; Asia; Japan; 日本国; Nihon-koku; Kansai region; 関西地方; Kansai-chihō; Kyoto Prefecture; 京都府; Kyōto-fu; Kyoto; Higashiyama-ku; 東山区; Places;
    When the function is run, it will alert that keywords does not contain keyword, even though it does:
    "Chion-in; 知恩院; Lily Pond; Bridge; 納骨堂; Nōkotsu-dō; Asia; Japan; 日本国; Nihon-koku; Kansai region; 関西地方; Kansai-chihō; Kyoto Prefecture; 京都府; Kyōto-fu; Kyoto; Higashiyama-ku; 東山区; Places; " does not contain "日本国"
    Previously I was using indexOf, which doesn't have this problem, but I can't use that since it doesn't match the whole word.
    Is this a problem with my regex, is there a modifier I need to add to enable unicode support or something?
    Thanks
    Dave

    ogre11 wrote:
    > I need to use refind to deal with strings containing
    accented characters like
    > ?itt? l?su, but it doesn't seem to find them. Also when
    using it with cyrillic
    > characters , it won't find individual characters, but if
    I test for [\w] it'll
    > work.
    works fine for me using unicode data:
    <cfprocessingdirective pageencoding="utf-8">
    <cfscript>
    t="Tá mé in ann gloine a ithe;
    Nà chuireann sé isteach nó amach
    orm";
    s="á";
    writeoutput("search:=#t#<br>for:=#s#<br>found
    at:=#reFind(s,t,1,false)#");
    </cfscript>
    what's the encoding for your data?

  • Java Switch Statement with Strings

    Apparently you cant make a switch statement with strings in java. What is the most efficient way to rewrite this code to make it function similar to a swtich statement with strings?
    switch (type){
                   case "pounds":
                        type = "weight";
                        break;
                   case "ounces":
                        type = "weight";
                        break;
                   case "grams":
                        type = "weight";
                        break;
                   case "fluid ounces":
                        type = "liquid";
                        break;
                   case "liters":
                        type = "liquid";
                        break;
                   case "gallons":
                        type = "liquid";
                        break;
                   case "cups":
                        type = "liquid";
                        break;
                   case "teaspoons":
                        type = "liquid";
                        break;
                   case "tablespoons":
                        type = "liquid";
                        break;
              }

    I'd create a Map somewhere with entries "liquid", "weight", etc.
    public class Converter {
        private static Map<String, List<String>> unitMap = new HashMap<String, List<String>>();
        private static String[] LIQUID_UNITS = { "pints", "gallons", "quarts", "millilitres" };
        private static String[] WEIGHT_UNITS = { "pounds", "ounces", "grams" };
        static {
            List<String> liquidUnits = new ArrayList<String>();
            for (int i = 0; i < LIQUID_UNITS.length; i++) liquidUnits.add(LIQUID_UNITS));
    unitMap.put("liquid", liquidUnits);
    ... // other unit types here
    public String findUnitType(String unit) {
    for (String unitType : unitMap.keySet()) {
    List<String> unitList = unitMap.get(unitType);
    if (unitList.contains(unit))
    return unitType;
    return null;
    It might not be more "efficient", but it's certainly quite readable, and supports adding new units quite easily. And it's a lot shorter than the series of if/else-ifs that you would have to do otherwise. You'll probably want to include a distinction between imperial/metric units, but maybe you don't need it.
    Brian

  • Using OR operator with string

    How we can use OR operator with string in java??

    Gaurav1 wrote:
    its logical OR operator;how can we use it with matcher classLike its been said already. The "logical OR" is used the same everywhere.
    Why don't you post the code you're having problems with. (Only the relevant areas, please. And use code tags.)

Maybe you are looking for

  • Smb mounted volume eject fails - in use by finder

    Recently (Maybe starting with 10.8?) it seems if I "Map a drive" from my server, (Using the Finder -> Go menu -> Connect to Server... Then entering smb://appserv1.home.local/g$) It seems if I double click the drive in the finder it just spins and I a

  • How can I get Data from the Sound cart in Labview? Does a VI exist?

    How can I get Data from the Sound cart in Labview? Does a VI exist?

  • Error when logging into account

    I'm getting an error when trying to log in to my account. I had 3 hard drives in my Mac and removed 2 of them and wiped/installed into another computer. I still have the hard drive with OSX on it installed, but when I try to log into my account it sa

  • Horizontal Scrolls on the  main Stage

    Hi I am putting 11 movies containing 11 flv files on my main stage. All those movies have onMouse over and click events attached with them. As those movies are not going to fit on the main stage so when i am running the flash file, it is just display

  • BizTalk User Credentials, Certificates in transport header

    BizTalk handles user credentials in Enterprise Single Sign on and the certificates are stored in Certificate store. I have been asked a general question, Is it possible that user credentials & certificates in a transport header? I am not exactly sure