Using Variable in place of property name in set_item_property procedure.

Hello,
I need to change the item properties dynamically by using variables for both properties names and their values.But during compilation its showing me error "Too many declrations".Kindly suggest me any best way.

You already have the answer to that one in the posting above.
Your table would presumable include rows HEIGHT, WIDTH etc.. as text columns
So you'd cross reference as above.
Alternatively you could find out what the numerical values are for HEIGHT (1509) and WIDTH (1508) are and store them in your master table alongside the description that your user will see. Then you can simply do the set_item_property.
This relies heavily on Oracle not changing the values for these constants. Even if they did you would just have to change your table. Then your solution is generic and future proof.
Built in for all properties: Not that I know of. But you could sort of use your table as above to help. Simply loop through the constants, do a get_item_property, and show that to the user.
You'll have to be careful about maybe classifying the things in your table to ensure you don't try to get an inappropriate property for the type of item.
With a little effort this will all definitely be possible.
I saw a thread the other day where someone had created a form called "props.fmb" which showed the item properties in a tree style. See if you can find that. This was fairly hard coded compared to what you want, but it would be pretty good as a basis.

Similar Messages

  • Trouble using variable to get mc property

    I'm creating a rollover effect for a collection of 12 mcs so
    that on mouseover the clip grows a little bit. This involves
    locating the x and y coordinates each clip, and to do so I've tried
    to farm the job out to a few variables and one function, so that
    the onRollOver event simply sets the variables and calls the
    function.
    It's not working. Flash seems to be implying that I can't use
    a variable (string type) to get a property -- ie. variable._x
    rather than myInstanceName._x
    Is this correct, or is my error elsewhere?
    Hope you can help.
    (By the way, there will of course be an onRollOut event as
    well. Just getting this bit to work first.)
    Thanks;
    Rick
    (Here's the code):

    When using brackets to do what you are doing can be
    frustrating if you are not aware on how to use them especially when
    you start nested movieclips. Below I have several variations on
    ways to do it and ways not to do it. I am using a variable ( i ) to
    show how it is done by dynamically referencing a movieclip. My
    rule-of-thumb are the following when using brackets ( [ ] );
    1. Encapsulate ONLY ONE movieclip with brackets.
    2. Never have a dot next to the outer left bracket.
    3. Always have a dot next to the outer right bracket when
    accessing a movieclip’s property.
    For the first part of code I have a movieclip on stage with
    an instance name of “ball3_mc”. For the second part of
    the code I have a movieclip named “ballholder_mc” that
    now contains ‘ball3_mc’ inside of it. I hope this
    helps.

  • Use variable in SQL for column name

    Hi All,
    We want to use a user input as a column name in APEX.
    For e.g user will enter "ALLOWABLE_AMOUNT" then the query will be as follows  :
    select Rule,rule_name,rule_desc,"User Input" from rule_dim
    where "User_input" > 100
    So here the User_input will be substitued with Allowable_amount. Is this doable using any bind/substitution variables ? I tried ":P2_USER_VARIABLE" and "&P2_USER_VARIABLE." but did not work.
    Please advice.

    Hi Andy,
    You do that with an Interactive Report and a Dynamic Action.
    I'll assume that you're using APEX 4.2
    Here's how:
    Create Page 2 with an Interactive Report
    Create New Page > Report > Interactive Report > Next > Next
    Enter a SQL Select statement: select Rule,rule_name,rule_desc from rule_dim
    Next > Create > Edit Page
    Create the item P2_USER_VARIABLE
    Add Item > Number Field > Next
    Item Name: P2_USER_VARIABLE
    Next > Next > Next
    Source Used: Always, replacing any existing value in session state
    Source Type: Static Assignment (value equals source attribute)
    Create Item
    Create a Dynamic Action to refresh the Interactive Report when P2_USER_VARIABLE is changed
    Add Dynamic Action
    Name: Refresh IRR
    Next >
    Event: Lose Focus
    Selection Type: Item(s)
    Item(s): P2_USER_VARIABLE
    Next >
    Action: Refresh
    Next >
    Selection Type: Region
    Region: Report 1 (10)
    Create Dynamic Action
    Add the ALLOWABLE_AMOUNT to the Interactive Report
    Report 1
    Region Source: SELECT * FROM (select Rule,rule_name,rule_desc, :P2_USER_VARIABLE AS ALLOWABLE_AMOUNT from rule_dim) WHERE ALLOWABLE_AMOUNT > 100
    Apply Changes > Apply Changes
    Get the Interactive Report to submit P2_USER_VARIABLE
    Report 1
    Page Items to Submit: P2_USER_VARIABLE
    Apply Changes
    Change the Heading for ALLOWABLE_AMOUNT in the Interactive Report
    Interactive Report
    Change the Heading of ALLOWABLE_AMOUNT to &P2_USER_VARIABLE.
    Apply Changes
    Run
    Enter something into the USER VARIABLE field and select something else on the page. Watch the last column update to that value.
    Tim.

  • Using OID in place of attribute name in an update operation

    Hi,
    I use Iplanet DS 5.0 on Solaris 8.0
    An application that I use needed a custom defined schema.
    This application tries to update entries using the OID of the attribute instead of the attribute name.
    ie. It uses
    Add: 2.5.4.58;binary
    instead of the name of the attribute -- attributeCertificateAttribute that has been defined in the directory.
    This operation fails with an objectClass violation.
    The developer pointed out that this was allowed by the RFC and that it worked with other directories.
    Later I tried replacing attribute names by their OIDs in corect LDIF files and these operations failed too.
    I have included an ethereal trace of the request and of the response.
    Question:
    Does this work on Iplanet DS? How can I get it to work ?
    Thanks,
    sriad
    Request
    =========================================
    Message Id: 2
    Message Type: Modify Request (0x06)
    Message Length: 437
    Distinguished Name: CN=User0,O=PERMIS,C=GB
    Add: 2.5.4.58;binary
    Response
    ======================================
    Message Id: 2
    Message Type: Modify Result (0x07)
    Message Length: 7
    Result Code: Objectclass violation (0x41)
    Matched DN: (null)
    Error Message: (null)

    Thank you ReubenC, the business has decided to not proceed with the LDAP configuration of web.config at this time and would rather stay with using the TNS entry for the time being; this is because we just mirgated their instance to an 11g environment and they want to ensure they have no issues with the migration before they take on web.config changes too.
    I will however try your recommendation when they choose to proceed and let you know how it turns out.
    Thank you,
    Charlie

  • Variable subsitution for target file names

    Hi All,
    I am using variable subsitution for dynamic file names. I am using the multimapping for multiple files in the target.So i coluld not able to use the dynamic configuration for file names. Now i want to replace all the spaces in the filename to underscore.
    For example
    My payload filed value "file name in the target file".
    Now my filename  "file_name_in_the_target_file".
    How to achieve this using Variable subsitution.
    Regards,
    Ramalakshmi.G

    Use replaceString Function.
    file name
    Constant (" ")               --> replaceString -------> TargetField
    Constant ("_")
    Regards
    Ramesh

  • Rendering property name from bundlefile in XML From

    Hello, all.
    I've used bundle file to show property names on different languages. Everything works fine in details window of resource. Is there any way to use names from bundle file in XML form? Now I have to put constant names in XML Form. So in different portal languages a form look identically.

    Hi Roman,
    Read this information:
    http://help.sap.com/saphelp_nw04/helpdata/en/f3/9d833c0b3e042de10000000a114027/frameset.htm
    Patricio.
    Message was edited by: Patricio Garcia

  • Backout count property name

    Hello,
    What is the name of the property storing the backout count field of a message in the MQ implementation of JMS?
    Thanks.

    no i was just using the cells that said property name and property value
    i tried typing in the EVPRO statement in the MEMBER cell it brings up the account so i know my formula is correct but the report will not bring in that account.

  • Unknown variable or property name 'ReportFilePath'. Error accessing item 'Runstate.Root.Locals.ReportFilePath'. in TestStand

    Hi all.
    I was using Teststand 4.2 up to last week and upgraded to TS 2013. In 4.2 I was using the following to get the location of the teststand report:
    Runstate.Root.Locals.ReportFilePath
    but with TS 2013 this no longer works.. is the following error:
    Unknown variable or property name 'ReportFilePath'.
    Error accessing item 'Runstate.Root.Locals.ReportFilePath'. in TestStand - Get Property Value (String).vi->
    I've tried the following now with no success:
    RunState.Root.Report.Location
    So my question is how can I get the location (path) of the report file during test programmatically please?
    Please find enclosed a screenshot of the report config:
    Solved!
    Go to Solution.
    Attachments:
    TS_ReportConfig.png ‏42 KB

    Shashidhar,
    Thanks for your help! With your tips, I finally got it to work. For anyone else trying to modify report names based on user input after the sequential process model sets the file name path I will re tell what I did:
    Edit the Ni_RerportGenerator.seq plugin found in C:\Program Files (x86)\National Instruments\TestStand 2014\Components\Models\ModelPlugins\
    You go into this file and add the step higlighted in Blue at that same location. Please see the expression I typed in the expression box. Setting Parameters.ReportOptions.NewFileNameForEachUUTStatus to true forces re-evaluation of the report name at the end of the sequentialmodel.seq.
    Then you add a FileGlobal in the sequenatialmodel.seq. I called my FileGlobal ReportFileName
    Then I added an expression in my test sequence that modified the the new FileGlobal I created:
    Finally I updated the report options (Go to Cofigure>Report Options > Report File Pathname and under File/Directory Options select "Specify Report File Path by Expression" and I entered my expression. It appears that you can disregard the evaluated report file path error (box below) because your pathname won't be generated until run-time.
    This worked well for me hopefully it will for others. 
    Thanks,
    Marco

  • "sCode=0xf​fffbc66: Descriptio​n: Unknown variable or property name 'ReportSty​le'. Error accessing item 'ReportSty​le' when trying to optn the ReportOpti​ons in TestStand 4.0.

    I get the error "sCode=0xffffbc66: Description: Unknown variable or property name 'ReportStyle'.  Error accessing item 'ReportStyle'. when trying to load the ReportOptions in TestStand 4.0.
    Has anyone seen this before?  If so how can I get around it as I will need to disable Report Generation for this system.
    Thank you

    Hello,
    I am not 100% sure how I resolved this issue as it was a few years ago.  However, I have attached the TestStandModelReportOptions.ini file that I used - hope this helps you.
    Attachments:
    TestStandModelReportOptions.ini ‏5 KB

  • Why does DB_PLImpotExportProperties throw "Unknown variable or property name. (Error = -17306)"?

    When I run GenericImportExport.seq, the call to  DB_PLImpotExportProperties brings up the Import/Export dialog. When I copy that step into my existing sequence, the error "Unknown variable or property name. (Error = -17306)" is thrown. I can see no difference between the two. They also appear to be running in the same environment.
    Any suggestions?
    Solved!
    Go to Solution.

    So this was bothering me enough that I went back and recreated the problem. I cannot even call the entire sequence without getting this error.
    I added a step to my test sequence that makes a call to the sequence GenericImportExport.seq in a separate file (where it was installed). Right-clicking on the the step and selecting "Run Selected Steps" causes the subject error.
    I CAN use the tool menu "Import/Export properties..." or open the sequence itself and run ImportExport without a problem.

  • How can I use a variable as an array's name?

    Ok I have several arrays in my code (lets call them "array1", "array2" etc) and I want to load them based on the users input. So if the user enters array1, I want the first array to be loaded, and the same with the other arrays.
    I tried saving the user's input on a string variable called ARRAY_NAME, so that each time the user enters a different array name, the corresponding array is loaded. Something like this:
      ARRAY_NAME[c1][c2]; but I get this error:
    array required, but java.lang.String found
              ARRAY_NAME[c1][c2];
    ___________^
    Can you please tell me what is the correct way of doing it?
    Thanx!

    The short answer is you can't. An object name can't be
    variable and must be known at compile time. But you
    could associate the user input name with a particular
    array, for example, using a HashMap with the user name
    as the key to an array. However, you'd need to use a
    container class (Vector, ArrayList, etc.) rather than
    a raw array, because containers only take class
    instances as elements.Maps can't deal with primitives, that is true. However, arrays are full scale objects, so they can be put into maps.
    Also, my code had a bug in it. Try this:
    int userIndex = getUserIndex();
    String userInput = getUserInput();
    Field array = getClass().getDeclaredField(userInput);
    Object item = Array.get(array.get(this), userIndex);

  • Using variable with the same name as field name?

    I have a complex proc where I have variables with the same name as field name used on a query. something like this:
    SELECT a.id_table WHERE a.id_table = id_table
    where the last id_table is a parameter sent to the proc:
    declare procedure myproc(id_table int)
    Is there any way or notation to declare the variable inside the query as a variable or I have to use a different name?

    Well, variables are not the only thing you have to change if you want to switch to Oracle.
    Although I don't think it is good practice (to use variable name same as column name), here is one example how you can achieve it using EXECUTE IMMEDIATE and bind variable
    SQL> select deptno, count(1)
      2  from scott.emp
      3  group by deptno;
        DEPTNO   COUNT(1)
            30          6
            20          5
    10 3
    SQL> set serveroutput on
    SQL> declare
      2  deptno varchar2(10);
      3  i number;
      4  begin
      5  deptno:=10;
      6  execute immediate
      7  'select count(1) from scott.emp where deptno=:deptno' into i using deptno;
      8  dbms_output.put_line('OUT ---> '||i);
      9  end;
    10  /
    OUT ---> 3
    PL/SQL procedure successfully completed.
    SQL> Message was edited by:
    tekicora
    Message was edited by:
    tekicora

  • Used variable substitution to substiture the field 'date' in file name

    Hi gurus
    I have used variable substitution to substiture the field 'date' (dd/MM/yyyy/hh/mm/ss) in the file name so when empty payload (a valid xml ) is generated by Message mapping then the communication channel is failing by showing the following error
    File processing failed with com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during
    variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload
    : date
    As of now the business is not getting effected as the business scenarion needs only customer master data at the reciever side But when ever there is no custmer master data in the sourse side the message mapping is generating an empty payload and the communication channel is failing ( so it is an internal issue and is there any way which could solve the both (ie the business must not get effected and as well the communication channel must not fail)
    any coments on this will be higly apreciated
    thanks and regards
    sandeep

    Hi Sandeep -
    Yes If you use the Variable substitution from the payload , that perticular field has to be generated in the target structure.
    To handle this You can do the following:
    Sourcefield --->exists -> IfThenElse-->TargetField
    Where     SourceField>exists(node function)-> If
                   SourceField -
    >Then
                   CurrentDate(Date Function)----->Else
    Hope this will help !!
    Regards.
    Jeet.

  • Reciever File Adapter - Temp File Name Scheme using Variable Substitution

    How can I create a temporary file that uses variable substitution? 
    We are having a problem with files merging when we write files using the "Use Temporary File" setting on the FIle Adapter.  So two independent files are merging into a single file.  We are not using the "Append" setting.
    We would like to use a Temp File Name Scheme that would append the message id onto the temporary file name. 
    Using variable substitution we created a msgid variable.  When added to the temporary file name using %msgid% the temporary file name is created with %msgid% in the name instead of the actual message id.  We put the variable into the "File Name Scheme" as well and the end completed file used the message id in the name.
    Any Ideas?
    Thanks,
    Matt

    HI Matthew,
    Why are you adding the message id into the temporary file??
    I understand that you want the output of the filename to contain message id .. and hence you are using variable substitution for the same.
    Temporary file name will anyways get overwritten by the actual file name (here the actual filename will be using variable substituion).
    So i suggest to achieve your scenario you can add any name in the temporary file and maintain the desired filename you require as output in the variable subsititution.
    Temporary File Name option actually acts as a lock - unlock mechanism from PI side while the file is getting written to the file server so that while PI is writting the file no third party application batch program picks it up.
    I hope this helps.
    Cheers
    Dhwani

  • ORA-04054 : using variable substitution for the database link name

    Hi,
    I need to use variable substitution for the database link name.
    Here is my command :
    declare
    GET VARCHAR2(50);
    begin
    select OIA_GET_DESIGNATION into GET from INFODRI.OMA_IN_ARTICLES;
    for rec in (select * from [email protected]_GET_DESIGNATION)
    LOOP
    dbms_output.put_line('TEN_CODE vaut : '||rec.ten_code);
    END LOOP;
    exception
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE('ERREUR ORACLE DETECTEE : '||rec.OIR_CUR);
    DBMS_OUTPUT.PUT_LINE('Message Erreur : '||SUBSTR(SQLERRM,1,245));
    :crd := -1;
    end;
    When I run this programm, I receive the error :
    ORA-04054: database link REC.OIA_GET_DESIGNATION does not exist
    When I replace :
    for rec in (select * from [email protected]_GET_DESIGNATION)
    by :
    for rec in (execute immediate 'select * from tensions@'||rec.OIA_GET_DESIGNATION)
    I receive the error :
    PLS-00103 : Encountered the symbol "IMMEDIATE" while parsing.
    What can I do to resolv my problem ?
    Regards,
    Rachel

    What is the name of the DB Link and the name of the object you are selecting
    from?
    I find it easier to create a view on the remote object then use that in selects.
    e.g,
    Link Name = MyLink
    Object_name = Addr_Loc
    create or replace VIEW Rem_Addr_Loc AS
    select * from addr_loc@mylink;
    In the code I then use the view
    begin
      for C_Rec in (select * from Rem_Addr_loc)
      loop
         dbms_output.put_line('Rec: '|| C_Rec.Col1);
      end loop;
    end;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • How to setup remote login for sap netwever 7.01 abap trial version

    hi to all i dont know this is correct place to post this question plz let me know i have installed sap netweaver 7.01 abap trial version successfuly now i want to allow one of my friend to login this server but i dont have exact idea how to do this s

  • 10.5.3 update lost apps - how do i restore?

    Hi  - When I upgraded my iTunes to 10.5.3, it lost sight of all my music, movies, apps, etc.  I've managed to restore all the music, movies from my HD back up, but the apps are gone.  How can I get them back (still on all my devices, but gone from iT

  • Purchase Requistion being deleted on Technical Confirmation

    Dear All, I have seen that the Purchase requistion is being deleted after Technical Completion even after a PO has been created and Service Entry Sheet is also done for that PR. As I understand the system should delete only PR's which are open on TEC

  • Aggregates with Fixed values

    HI We have a requirement to create an aggregate on one of our infocubes. Dical period is going to be included as part of this aggregate. I would like to know if it is possible to set this aggregate to be populated for a fixed range of periods eg: 008

  • Why can't I print or download PDF files?

    I had Adobe Reader, and all was working fine.  Once I downloaded the trial of Adobe Acrobat XI Pro, the opening and printing of PDF files became much slower, and now, I am unable to print PDF documents, and downloading or opening of PDFs from the web