Re: Dynamic reference to an attibut name

Allen Vachon wrote:
Hi,
One solution should be to generate at run-time your textgraphics in
a gridfield (TextGraphic.Parent = GridField with row and column
affectation).
Then you can address them by CompoundField.Children.
Hope this helps,
Daniel Nguyen
Freelance Forte Consultant
>
Hi Forté developer,
I'm trying to create a calendar screen. Each cell are "TextGraphic"
widgets.
There is 6 months, each has 6 weeks and of course, 7 days. I named
them "M?W?D?" (M->Month; W->Week; D->Day). How can I do something
like that (if possible) or another way?
[Month 1] [Month 2] [Month 3]
[Month 4] [Month 5] [Month 6]
Problem: There is 252 objects to change, which is too much to handle.
One possible solution is to have only one month displayed instead of
6.
-- [M1W1D1...M1W1D7] [M2W1D1...M2W1D7] ...
-- [M1W6D1...M1W6D7] [M2W6D1...M2W6D7] ...
for MonthNumber in 1 to 6
for WeekNumber in 1 to 6
for DayNumber in 1 to 7
self.M<MonthNumber>W<WeekNumber>D<DayNumber>.State =
FS_DISABLE;
end for;
end for;
end for;
Thanks all and good long weekend.
Allen Vachon
[email protected]
Office: (819) 595-1794
FAX: (819) 595-8783-
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

Allen Vachon wrote:
Hi,
One solution should be to generate at run-time your textgraphics in
a gridfield (TextGraphic.Parent = GridField with row and column
affectation).
Then you can address them by CompoundField.Children.
Hope this helps,
Daniel Nguyen
Freelance Forte Consultant
>
Hi Fort&eacute; developer,
I'm trying to create a calendar screen. Each cell are "TextGraphic"
widgets.
There is 6 months, each has 6 weeks and of course, 7 days. I named
them "M?W?D?" (M->Month; W->Week; D->Day). How can I do something
like that (if possible) or another way?
[Month 1] [Month 2] [Month 3]
[Month 4] [Month 5] [Month 6]
Problem: There is 252 objects to change, which is too much to handle.
One possible solution is to have only one month displayed instead of
6.
-- [M1W1D1...M1W1D7] [M2W1D1...M2W1D7] ...
-- [M1W6D1...M1W6D7] [M2W6D1...M2W6D7] ...
for MonthNumber in 1 to 6
for WeekNumber in 1 to 6
for DayNumber in 1 to 7
self.M<MonthNumber>W<WeekNumber>D<DayNumber>.State =
FS_DISABLE;
end for;
end for;
end for;
Thanks all and good long weekend.
Allen Vachon
[email protected]
Office: (819) 595-1794
FAX: (819) 595-8783-
To unsubscribe, email '[email protected]' with
'unsubscribe forte-users' as the body of the message.
Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

Similar Messages

  • Dynamically reference :old.column_ name in trigger

    Hi all,
    I am writing an application for which i would like to include a limited audit trail.
    I have a form that is based on a table with approx 100 columns and wish to write the :old.column_name value on fields that have been updated, along with userid and date/time to an "audit" table.
    I think that I can do this by using the Before_update trigger and then the IF UPDATING ('column name') condition. However, for maintenance and readabiility, I wish to be able to dynamically reference the :old.column_name value, which I cannot get working.
    I know it can be done with a large IF statement, but due to the number of columns involved, this can lead to a maintenance nightmare. Also, if I can get this working, I want to include the procedure in a library for other applications, thus the need for dynamically referencing the table and column names.
    My proposed logic for the before_update trigger is:
    Declare Vcolumn_name Varchar2(50)
    Get column names for table (using select cursor)
    loop through cursor
    Vcolumn_name := column name
    IF UPDATING (Vcolumn_name) then
    insert userid, timestamp, :old.Vcolumn_name into audit table
    end IF
    next cursor row
    :old.Vcolumn_name is where I am having trouble.
    Is this possible?
    Thanks
    Peter

    The pre-update trigger won't store the value of the old.column . If you are querying the data and then updating then use the POST-QUERY trigger to store the current values in global variables. In the PRE-UPDATE trigger assign the global variables to the columns of the audit tables.
    For instance in the PRE-FORM trigger initialize the global variables :
    :GLOBAL.VAR1 := ' ';
    :GLOBAL.VAR2 := ' ';
    In the POST-QUERY trigger
    :GLOBAL.VAR1 := :BLOCK.COLUMN1;
    :GLOBAL.VAR2 := :BLOCK.COLUMN2;
    In the PRE-UPDATE trigger
    INSERT INTO AUDIT_TABLE (COL1, COL2)
    VALUES(:GLOBAL.VAR1, :GLOBAL.VAR2);
    Hope this helps.

  • How do i dynamically reference the contents of an item in a where clause

    I have a select statement that references an item i.e. 'where sysdate=:diary.day1' at the moment, however i want to use this select to loop through every day of the week, so on the fist record it will change depending on where you are in the loop either 'where sysdate=:diary.day1' or 'where sysdate=:diary.day2' etc. I tried using a variable for this but it just uses the characters ':diary.day1' and not the contents of this item.

    Not sure what you want but dynamic reference the content of an item may be done with NAME_IN builtin.
    WHERE sysdate = TO_DATE( NAME_IN(var), 'fmt')
    where var is a variable which contain item name, for example 'DAIRY.DAY1'
    P.S. SYSDATE function contain not only date but time portion too.
    So very little chances that this equation will be true

  • Dynamic Reference to Registered XSD

    I generate docs from SELECT like this,
    <span style="color:red;">(I do not store this type of doc in DB/XDB)</span>:
    <div style="color:blue;">
    SELECT '&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;' || chr(10) ||
    xmlelement
    (&quot;ReinsuranceXfer&quot;,
    xmlattributes
        ('http://blah.com/blah2/types/common' AS &quot;xmlns&quot;,
         'http://www.w3.org/2001/XMLSchema-instance' AS &quot;xmlns:xsi&quot;,
         'http://blah.com/blah2/types/common http://blah3/xmlschemas/Sales_v1.xsd'
         AS &quot;xsi:schemaLocation&quot;),
     xmlelement
        (&quot;SalesTransactions&quot;,
         xmlattributes('DirectTransactions' AS &quot;xsi:type&quot;).......
    </div>
    the schema &quot;Sales_v1.xsd&quot; is XDB-registered.
    In stead of hard-coding <strong>&quot;Sales_v1.xsd&quot;</strong> in PL/SQL or View definition
    I want to DYNAMICALLY reference the value, so when I switch to
    version 2, registering the new schema (deleting the old one)
    the value <strong>&quot;Sales_v2.xsd&quot;</strong>
    can be dynamically referenced.
    Is there a better/&quot;smarter&quot; way to achieve the dynamic reference
    than this ?
    <div style="color:blue;">
    SELECT substr(any_path, instr(any_path, '/', -1) + 1) xsd
        FROM resource_view
       WHERE any_path LIKE '%Sales%.xsd';
    </div>
    thanks
    10gr2

    You can't invoke methods on bits of String as if they were references to objects. (Java isn't like PHP in this regard.)
    You can, however, use arrays as db suggested.
    Let's say I have a hundred toggle buttons. I might give them names like "okButton" "exitButton" etc. Or I might make them elements of an array of buttons, buttonArr.
    And I have a method toggle(int) that accepts an integer as input and verifies that the argument is within the range 1 to 100, throwing an exception if it is not. This method is intended to select the toggle button that corresponds to the integer it receives as input as selected. So the method would be implemented as
    buttonArr.setSelected(true);

  • Dynamic reference to buttons

    Hi all,
    I'd like to make dynamic references to togglebuttons (I'm using netbeans). In pseudo code, I would like to be able to do something like:
    For(int i = 1, i<10, i++){
    buttonName = toggleButton;
    buttonName.concat(numToString(i));
    convert buttonName to handler 'handle'
    handle.setSelected(true);
    With classes, it seems to me that I could use Class.forName, but I have no idea how to make this work for an interface element, and I can't find it on the web.
    Any help is welcome, thanks!
    Edited by: jefke33 on Jun 20, 2009 1:12 PM
    Edited by: jefke33 on Jun 20, 2009 1:13 PM

    You can't invoke methods on bits of String as if they were references to objects. (Java isn't like PHP in this regard.)
    You can, however, use arrays as db suggested.
    Let's say I have a hundred toggle buttons. I might give them names like "okButton" "exitButton" etc. Or I might make them elements of an array of buttons, buttonArr.
    And I have a method toggle(int) that accepts an integer as input and verifies that the argument is within the range 1 to 100, throwing an exception if it is not. This method is intended to select the toggle button that corresponds to the integer it receives as input as selected. So the method would be implemented as
    buttonArr.setSelected(true);

  • Service Registry XSD dynamic reference not working

    Hi ,
    I have published an employee canonical schema to service registry. I have referenced it in my BPEL in my wsdl file as follows
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
                   <import namespace="http://systinet.com/uddi/demo/employeeList" schemaLocation="employees.xsd" id="uddi:company:HR:EmployeeCanonical" />
              </schema>
    I have deployed the BPEL and is working fine. When I updated the service registry to point to the lastest version of canonical file , the BPEL is not reflecting to the new version. I have bounced both bpel server and reg. service but still no difference.
    please let me know how I can dynamically reference the xsd in service registry.
    appreciate your help.
    thanks
    Srini

    Hi
    I am having trouble making the BPEL and Systinet to work together. I have Systinet and BPEL installed separately on 2 different servers. I deployed my web services and registered them in UDDI. I created a new BPEL process and added a partner link to refer to one of the web service I have registered in UDDI. When I create the partner link, it is forcing me to give the wsdl and it also gives an error message " There are no partner link types defined in current wsdl. Do you want create that will by default create partner link type for you?". If I say "NO' then deployment fails. If I say "Yes", then it creates a new wsdl file on the local server etc and gives "<Faulthttp://schemas.xmlsoap.org/soap/envelope/>
    <faultcode>soapenv:Server.userException</faultcode>
    <faultstring>com.oracle.bpel.client.delivery.ReceiveTimeOutException: Waiting for response has timed out. The conversation id is 75164a0815ea471a:-3be8c246:117cc377894:-537b. Please check the process instance for detail.</faultstring>". Any help is appreciated.

  • Dynamic change in the query name based on user input

    Hi Gurus,
    In a scenario, country appears as a user input variable.When the user specifies his country, the same query displays <b>Business trends</b>' data pertaining to his own country and rest of the world(international) in two tables.The reports are developed using Web application designer.
    Can the name(description) of the query be changed  so that the user input value for country gets dynamically reflected in the query name like <b>Business trends:Selected country vs International</b>?
    Regards,
    Balaji

    Hi Bala,
      ya this can be done by text variables. create a text variable( replacement path on the country infoobject) by going to the query properties on the description.
    if the user enters country value then it will be displaed on the description of the query .
    assign points if useful .
    regards
    santosh

  • ORA-32031: illegal reference of a query name in WITH clause

    Oracle tutorial : http://www.oracle.com/technology/pub/articles/hartley-recursive.html#4
    When Executing this Query 6: Using a Recursive WITH Clause
    WITH C (CNO, PCNO, CNAME) AS
    (SELECT CNO, PCNO, CNAME -- initialization subquery
    FROM COURSEX
    WHERE CNO = 'C22' -- seed
    UNION ALL
    SELECT X.CNO, X.PCNO, X.CNAME -- recursive subquery
    FROM C, COURSEX X
    WHERE C.PCNO = X.CNO)
    SELECT CNO, PCNO, CNAME
    FROM C;
    Error: ORA-32031: illegal reference of a query name in WITH clause
    kindly suggest what need to do in case of recursion using subquery

    SCOTT@orcl> ed
    Wrote file afiedt.buf
      1  with c as
      2  (
      3  select empno,ename from emp
      4  where deptno=20
      5  union all
      6  select c.empno,c.ename from emp c
      7  where c.deptno=30
      8  )
      9* select * from c
    SCOTT@orcl> /
         EMPNO ENAME
          7566 xx
          7788 xx
          7876 xx
          7902 xx
          7499 xx
          7521 xx
          7654 xx
          7698 xx
          7844 xx
          7900 xx
    10 rows selected.
    SCOTT@orcl> ed
    Wrote file afiedt.buf
      1  with emp as
      2  (
      3  select empno,ename from emp
      4  where deptno=20
      5  union all
      6  select c.empno,c.ename from emp c
      7  where c.deptno=30
      8  )
      9* select * from emp
    SCOTT@orcl> /
    select empno,ename from emp
    ERROR at line 3:
    ORA-32031: illegal reference of a query name in WITH clause
    SCOTT@orcl>You can not use the same table name alongwith WITH clause's cursor name. See as above if i says with C as... its works; but if i says with emp as... it returned ora-32031, because it is the name of table.
    HTH
    Girish Sharma

  • FRM - 40105 : Unable to resolve reference to item item name

    Hi,
    FRM - 40105 : Unable to resolve reference to item <item name>
    When I am opening a form I am getting the above mentioned error. Instead of <Item name> how we can display the error like <:CTRL_BLK.DOC_DATE>
    Thanks & Regards,
    Jenson

    Hi,
    Actually I know what is the reason for getting this error. What I tried to ask you is any way to display the item name, which error is occurred.
    In the form around more than hundred item setting the SET_ITEM_PROPERTY , there only I am getting this error. Like this around more than five form I have to debug. I would like to know through error handling routine or some other code we can display the exact item name, which error is occurred.
    Thanks & Regards,
    Jenson V.A.

  • Dynamically instantiating objects using string name

    Hello to all.
    This is probably an easy question, but I am wondering how I can dynamically create instances of an object in a loop using a string variable as the name.
    The idea here is this:
                   while (someBooleanVariable) {
                        int count = 1;
    String objectName = "myObject" + count;
                        myObject objectName = new myObject; // How do I pass the objectName String variable as a name?
                        count++;
                   } // End while
    Of course this doesn't work - incompatible types, but the idea is that the code would create "myObject1," "myObject2," "myObject3," "myObject4," etc as long as someBooleanVariable = true using the objectName String variable.
    I am new to this and appreciate any help and ideas.
    Thanks!

    BigDaddyLoveHandles wrote:
    There's been this outbreak of people wanting to dynamically name their variables -- is this some sort of scripting disease?It's always been around. Shoot, I remember suffering from it when I first started out, because it seems so, hm I dunno, necessary at the time. Eventually the newbie (me) realizes that the variable "name" means nothing, that reference is everything.
    ... and then I discovered maps, and names were useful again. :o)

  • How can I dynamically reference a sheet based upon the contents of a cell

    I'm using Numbers to store specifications for various products. Each sheet stores specifications in a standard manner (i.e. same table and cell names) and the sheet is named according to the name of the product.
    On another sheet I've got a dropdown list containing the names of the product tabs. I'd like to dynamically pull data for a particular product when it's sheet is selected in the dropdown list by using the dropdown cell in a reference like:
    =B1::STC::A4, where B1 is the dropdown list and STC::A4 is the product specification table and cell reference.
    When I use this, the B1 reference fails.
    Any suggestions would be greatly appreciated.
    Thanks.

    Amos,
    you will have to use the indirect function to convert the string you are creating into a valid reference.
    Note:  The Sheet names, Table names and cell references must all match exacty.
    If the sheets are named "B1", "C1" and "D1" and the popup menu is in the cell A1 and contains the strings:
    B1
    C1
    D1
    The table name is "STC"
    then you can create a valid reference like this:
    = indirect(A1&"::STC::A4")
    if the table name were also dynamic and were stored in cell A2 you could create the reference like this:
    = indirect(A1&"::"&A2&"::A4")

  • Dynamic text in buttons : instance name goes "instanceX"

    Hi,
    Another weird one (for me at least !)
    I've added a dynamic text to a button and named it, say,
    myTxt.
    If I put this button on stage as a movieclip I can target
    text as
    :_level0.btn1.myTxt
    If I put the button on stage as the button it really is,
    debugger tells
    me text instance is now : _level0.btn1.instance1
    Why ?
    Thanks in advance.
    PJ

    because buttons aren't movieclips and don't have timelines.
    so you can't reference items on, what appears to be a button
    timeline, with normal dot notation.
    the only real mystery is why flash allows you to apply an
    instance name to an object on that button's pseudo timeline.

  • Dynamic SQL Statement with table name

    Dear all
    i like to have a SQL statement with a dynamic tablename. Is this possible? If yes, how?
    should be something like "select * from <mytablename>"
    Thank you
    Herbert

    Yes this is possible. use the below reference code for this.
    data: g_tablename type w_tabname,
            gv_dref TYPE REF TO data.
    FIELD-SYMBOLS: <g_itab> TYPE STANDARD TABLE.
    gv_tabname = p_tablename (take table name form selection screen or as per ur requirement)
    CREATE DATA gv_dref TYPE TABLE OF (g_tabname).
    ASSIGN gv_dref->* TO <g_itab>.
    now use the below select query to fetch the data
      SELECT * FROM (gv_tabname) INTO TABLE <g_itab>.
    Hope this will help

  • Dynamically set report viewer report name

    <p>I have a CR4E application with several reports. I want to use the same viewer for each report in the app but need to change the report name based on the user&#39;s selection from a dropdown list on a form. How do I dynamically change the reportName in the viewer?<br />Thanks, Bill</p>

    The viewer takes reportSource objects to display reports. The trick is to always have viewer in a seperate page from the rest of your business logic.
    I created a sample for you where I have a page that has two links. Both links go to the same jsp page but they display different reports depending on the variables placed in the URL. My viewer page then reads the URL to discover which report you want display.Â
    First Page:Â
    <</font>body>
    <<font size="2" color="#3f7f7f">a href="DynamicReportViewer.jsp?report=CrystalReport1.rpt" > Report1 </</font>a><</font>br>
    <</font>a href="DynamicReportViewer.jsp?report=CrystalReport2.rpt" /a>Report2 </</font>a><</font>br>
    </<font size="2" color="#3f7f7f">body>
    JSP CODE to display reports
    String reportName;
    reportName = (String)request.getParameter("report");
    ReportClientDocument clientDoc = (ReportClientDocument) session.getAttribute(reportName);
    <font size="2" color="#7f0055">if</font>(clientDoc ==<font size="2" color="#7f0055">null</font>) {clientDoc =<font size="2" color="#7f0055">new</font>ReportClientDocument();
    clientDoc.open(reportName, OpenReportOptions._openAsReadOnly);
    session.setAttribute(reportName, clientDoc);
    CrystalReportViewer crystalReportPageViewer =<font size="2" color="#7f0055">new</font>CrystalReportViewer();
    IReportSource reportSource = clientDoc.getReportSource();
    crystalReportPageViewer.setReportSource(reportSource);
    crystalReportPageViewer.setOwnPage(<font size="2" color="#7f0055">true</font>); crystalReportPageViewer.setOwnForm(<font size="2" color="#7f0055">true</font>);
    crystalReportPageViewer.processHttpRequest(request, response, application, <font size="2" color="#7f0055">null</font>);
    Rob Horne
    http://diamond.businessobjects.com/blog/10

  • Populate header text with reference number and vendor name

    Hi Experts,
    My client wants to populate the line item text field - SGTXT in MIRO / FB60 with the reference number field XBLNR and the vendor name.
    Is it possible to do it before the invoice get posted?. Like, just after the user entered the vendor account number and the reference number in FB60 system picks the vendor name against the vendor number from LFA1 table and the reference number entered in FB60 screen and populates them in text field ?
    Similarly in MIRO - before the invoice get posted is it possible to pick the reference number from MIRO screen and pick the vendor name based on the PO number entered on the MIRO screen.
    Please advise how to do this.
    Thank you
    Shino

    Hi
    This can be achieved by using a User Exit in Substitution rule. This is done through GGB1. Define the rule
    Prerequisite
    (System T Code =FB01 or MIRO) and Account Type = K
    Substitution
    User Exit
    The following link will be of help to you to define a user exit in substitutition rule
    http://help.sap.com/saphelp_46c/helpdata/en/5b/d231a843c611d182b30000e829fbfe/content.htm
    Regards
    Sanil Bhandari

Maybe you are looking for