Conditional Link based on Checkbox value

I have a report where I have dynamically created a checkbox via HTMLDB_ITEM.CHECKBOX. I also have an edit link on each record.
The functionality that I need is, if the checkbox is unchecked then the link is active. If the checkbox is checked the link is inactive or when selected gives an alert and doesn't navigate to the edit page.
How can I do this

You mean like this? http://apex.oracle.com/pls/otn/f?p=43865:13
To achieve this I included a javascript function in the page's HTML Header as follows:
<script language="javascript">
function editIfChecked(idToCheck) {
if (document.getElementById('chk' + idToCheck).checked == true)
{redirect('f?p=&APP_ID.:14:&SESSION.::::P14_EMPNO:'+idToCheck);}
else
{alert('Sorry, Chief. You cannot edit this until you check the box.');}
</script>
Then change the edit link in your report to link to a URL like: javascript:editIfChecked(#EMPNO#);
Obviously change #EMPNO# to be the name of whatever unique ID column you're using. You'll need to change the javascript function as well so that it links to the right page in your app (unless it happens to also be page 14) and change the name of the item that is set (unless it happens to be P14_EMPNO).
Hope that helps,
Andrew
Oh and also the argument passed to getElementById will have to be changed to reflect whatever ID you are giving to your checkboxes in your call yo htmldb_item.checkbox. I used this in the example above: htmldb_item.checkbox(1,empno,'id=chk'||empno)

Similar Messages

  • Setting the Link Group Name in  Deep Link based on the value of a column

    Using Jdeveloper 11g, Jheadstart 11g
    Is it possible to override the link group name in deep linking. For example can I conditionally set that field based on the value of the item.
    Regards
    Edited by: aliegeh on Jul 25, 2010 8:35 AM
    Edited by: aliegeh on Jul 25, 2010 8:43 AM

    Thanks for the suggestion.
    Here is what I am trying to do:
    I have a table with one visible column that has the following entries:
    1. Create
    2. Modify
    3. Verify
    4. Approve
    5. View
    If the user clicks on row 1 (Create) then the link group name should be "CreateEmployees" to create new employees
    If the user clicks on row 3 (Verify) then the link group name should be "MaintainEmployees" for verification and so on.
    (This is role based and each role will have access to one or more of the rows in the tabler)
    It basically mimics a work-flow type of scenario.
    I tried to modify the template and looked at the line:
    action="$JHS.facesConfigGenerator.addItemGroupLinkTaskFlowCall((${JHS.Current.item})}" but got stuck there.
    Is there a way to change "JSH.current.item" in the template to read the group link name from another column say by using #if statements.
    One way I also tried was to introduce a column for each action such as CreateAction, VerifyAction etc which kind of agrees with your suggestion but the drawback is the need to modify the table if another task is required.
    Regards
    Edited by: aliegeh on Jul 25, 2010 8:36 AM
    Edited by: aliegeh on Jul 25, 2010 8:42 AM

  • Querying Leads based on checkbox value

    Hi I want to retrieve all the Leads based on my cpo_modified checkbox field.
    I'm using this to do it:
    objListOfLead = LeadHelper.createListOfLead(strLeadDim);
    objListOfLead[0].cpo_modified = "Y";
    //Campos de la entidad Lead a devolver
    objListOfLead[0].Country = "";
    objListOfLead[0].cpo_atInstallments = "";
    objListOfLead[0].cpo_atProfit = "";
    objListOfLead[0].cpo_atProfit_percent = "";
    (and some more, all empty too)
    objQryOutput = queryLeads(objListOfLead, mySession, false);
    But I've been unable to get what I want. I'm getting allways the same error:
    El campo 'ZBool_10' de la instancia del componente de integraci??n 'Lead' contiene una expresi??n de consulta no v??lida: 'Y'(SBL-EAI-13002)
    Any of you knows how to filter a query based on a checkbox value? Should I use "Y"or "1" or "true" perhaps???....I've tried many times with different expressions but all of them has been unsuccesfull to me...some ideas?
    Thank you very much!
    Noël

    Great Michael! The expression you suggested ='Y'" worked perfectly!
    Thank you VERY MUCH!
    But, why those kind of ¿tricks? are not well documented by Oracle? I've lost a great amount of time (been the first time I work over OnDemand) and that's a thing I really hate...
    My most sincerely thanks Michael!
    Noël

  • Entire row conditional formatting based on cell value

    What is the best way to apply conditional formatting to an entire row based on the value of one of the columns on that row? For example, I just want to highlight the entire row (make it red color) if the value of one of the columns is greater than 0. The method described in the past discussions is just way to difficult to apply in real life scenarios. I think it should work without any tricks as it's just a very basic functionality of spreadsheets.

    The other idea is to make a second table, which has a single column and is as wide as the first table.  This second table will reference the value in the first table which indicates how to shade and is formatted with conditional formatting.  The second table is slid behind the first, AND the first is made transparent.
    - Bottom table refers to original (top) table
    bottom table contains conditional formatting as:
    Now make the original table transparent by selecting the table and changing the background fill to none.
    Now send the second table to the back by selecting the table then the menu item "Arrange > Send to Back"
    Now slide the second table under the original

  • Output Condition Records based on Document Value

    I have a need to send/not send different pieces of output based off of Quote value.
    Example:  if a quotation is over $100 send a copy of the quotation to the field sales rep automatically.  And simultaneously if the quotation is under $4000 automatically send a copy of the quotation to the customer.
    I have different output types and we are sending all quotes to sales reps and customers but not sure how to set up the VV11 records to recognize the value of the quotation.
    We tried to set a threshold table (very custom) and it allows us to set a threshold but I can only contol the output to be over $100 or under $4000.  It will not accomodate both at the same time.
    We are running SAP 4.7

    Come to think of it, the best way to accomplish this is to configure 2 identical output types and apply the requirement routine to each of them. In the routine check the quantity and, accordingly, either propose output or not. For example, create output types Z1 and Z2. The requirement routine for Z1 would look like this:
    IF KOMKBV1-NETWR > 100.
      SY-SUBRC = 0.
    ELSE.
      SY-SUBRC = 4.
    ENDIF.
    For Z2 the routine would be the same but the condition would be '< 4000'. If the amount is 50$ then only Z2 would be proposed (since Z1 has a condition 'over 100$'). If the amount is 150$ then both Z1 and Z2 output would be proposed since 100 < 150 < 4000. For the amount $4001 only Z1 would be proposed.
    Please note though if a user adds the output manually then requirements are not checked (there will be a warning message, but no one ever pays attention), so you might want to disallow manual output creation for these types, depending on the business requirements.
    Hope this will resolve the issue.
    Edited by: Jelena Perfiljeva on Jul 7, 2008 3:45 PM

  • Acrobat Pro 9: Calculating Based on Checkbox Value

    Hi!
    I am a novice and I purchased Adobe Acrobat Pro 9. Can
    someone help me figure out how to do calculations of checkboxes? I
    am trying to do the following:
    I want to create 2 columns of 10 check boxes each. I want to
    keep a running total of how many are checked in Column 1 and a
    running total of how many are checked TOTAL (in both columns). Now,
    the document has 3 pages, and on each pages - there are 2 columns
    of 10 check boxes. I want the running total to include all boxes
    from the 3 pages.
    I hired a freelancer who did this in LiveCycle (using Acrobat
    Pro 8). It worked on her blank page, but when we copied and pasted
    the check boxes into my document (a pre-made PDF exam I have to use
    for work; my school would not allow me to give it to her to work
    with); the calculations wouldn't work. We went into LiveCycle and
    each time we opened up my document with her calculations, the
    language changed automatically from FormCalc to JavaScript.
    Can anyone give me advice or tell me what to do? (We do have
    two read only boxes that do calulations [total checked in Column 1
    and total checked] so it really should work...)
    Thank you for considering and taking the time out to help!
    Alisa

    Hello,
    I'm sorry I'm not able to address your question. These forums
    are specific to the
    Acrobat.com website and its set of hosted services, and do
    not cover the Acrobat family of desktop products.
    Any questions related to the Acrobat family of desktop
    products would be best suited in the Acrobat User Forums:
    Link to
    Acrobat Forums
    Thanks!
    Michelle

  • Conditional Format based on cell value

    For example; want to turn a cell yellow if its value is less than another cell value.
    Is this possible?
    Conditional format rules don't seem to like cell references.

    There are many ways to call attention to a value that needs to be emphasized because of its relationship to other values. What you decide to do will be influenced by how particular you are about the end result vs. the trouble that you will have to go through to achieve it. When other cells need to reference a cell that may be either text or numeric, you can use the TRIM function, or other text functions, to remove interfering characters. Here's an example, where you can see the last row multiplying the previous, manipulated row, by 2.
    Also, all the cells are formatted as Currency, with to ill effect. In the example I left the cells with the conditional format in default alignment so you could see the added space character against the left margin of the cell.
    I think the easiest way to call attention to a cell is to add an adjacent row of column with a conditional expression that 'lights-up' when there is an alarm condition.
    Jerry

  • Conditional formatiing based on Parameter value

    Hello All,
    I am having rdf report .It has two layouts(One for English and other for germany). Based on the Language paramter passed corresponding Layout is selected.
    But how could we achieve the same using XML Publisher.
    We can simply write a If statement saying if :P_language='English'
    But how do we refer the Input parameter :P_Lnaguage in the template builder and how do we write the if statment.
    Please let me know.
    Kind Regards,
    Kumar.

    Hi,
    at the top of yor layout template define your parameter in a form field:
    <?param@begin:P_language?>
    Then you can use this parameter in a if-condition:
    <?if $P_language='English'?>
    Regards
    Rainer

  • Link same column to different forms based on column value

    Hi All
    I have one report with column "STATUS" with values 'schedule' and 'Active'. I want to link this column to some forms based on these values if column value is 'schedule' then it will go to some other form or if value is 'Active ' then go to some other forms and also i want to send some parameters of particular column value so it will fetch data from table based on this status. how can i link same column to diffrent forms. please help me out.
    Thanks

    Hi,
    In the report query you can conditionally generate the links.
    Example.
    select
    case when status = 'schedule' then  '<a href="'||'f?p=&APP_ID.:150:&SESSION.::NO:150:P150_ITEM1,P150_ITEM2:'||
          value_for_item1||','||lvalue_for_item2||'">status </a>'
    when status = 'active' then  '<a href="'||'f?p=&APP_ID.:200:&SESSION.::NO:200:P200_ITEM1,P200_ITEM2:'||
          value_for_item1||','||lvalue_for_item2||'">status </a>'
    else status end column_title,
    ....Regards,
    Natarajan
    Edited by: Nattu on Mar 18, 2013 11:53 PM

  • Enable/Disable a link based on a column value

    Hi Team,
    I am Using Jdev 11.1.1.5.0.
    I have a link button named 'register'on first page by clicking on to which will navigate to next page where i will get the option of selecting for the courses through checkboxes.
    When all the checkboxes are checked by clicking on the submit button i am able to update the checkboxes value in the backend and able to navigate to the first page.
    I can count that all the checkboxes are checked.
    My requirement is if all the checkboxes are checked i wanted to disable the register button other wise keep it as enable.
    The data on the first page and second page are joined using a view link.
    the data on the first page contains employee records and the data on the second page contains record for the courses selected for the corresponding employee.
    Please let me know what is the correct approach for it.
    Kindly guide me in it.
    Thanks,
    Ajay

    Which scope is the bean defined in?
    You can put the bean in pageFlowScope. This way it can be accessed from both pages. Now you implement a method in the bean which returns the count or better a method which make the decision if all check boxes are checked and returns true if yes and false otherwise.
    The signature of the method looks like
        public boolean isAllChecked()
            // calculate if all marks are checked
            return true;
        }and in your page you access the method on the disabled property like
                  <af:commandButton text="commandButton 1" id="cb1"
                                    disabled="#{pageFlowScope.YUOT_BEAN.allChecked}"/>Timo

  • Conditional formatting of a cell based on a value in another cell

    I want to change the color of the text in a cell based on the value in a different cell. How can I accomplish this?

    drmjdoyle,
    There Numbers User Guide, http://support.apple.com/en_US/manuals/#iwork, will show you how to do that. Also, doing a search in these forums will provide many hits answering your question.
    Click in the cell you want the color to change: click Format > Create custom cell format, in the first dropdown in that dialog box click Choose Rule, then follow the prompts.
    Cordially,
    RicD

  • Pricing condition based on a $ value

    Hello,
    We have a uniqure requirement in the Pricing for a Sales Order.
    We have a sales price condition PBXX maintained and it populates automatically during sales Order creation.
    Now what we want is if the total of all the conditions is less then 5000$ at the header level then the system should populate another condition with a $ value on it.
    So basically we want another condition (with a fix $$ amount that we will maintain) to come up in the sales order when the header value of that order is less then 5000$.
    Any Ideas?
    Thanks
    SAP Fan....

    hey friend ,
    i read again what you wrote,
    lets make it simple :
    A) you have 1 header condition that works in he sales order  : PBXX - maintain a value in vk12 .
    B) create another header condition :  Z005 - and maintain a value in vk12 .
      ( its possible to maintain a value for header conditions )
    C)  now you want to activate the second condition (Z005 )  if the sum of all the conditions
         is greater than 5000 ,
    2 options :
      1. hard coded - go to transaction VOFM-REQUIRMENTS-create  new formula :
          and add the next lines to the routine :
           FORM "XYZ" ( the name is generated by the system ) :
          check 1 = 2.
          if komp-netwer > 50000
          check 1 = 1.
          end if .
    2.  by " value scale " -  define Z005 condition as a value scale.
    go to transaction vs01 and define the following  intervals :
    0 - 5000  USD                   
    5000 - 9999,9999      USD
    go to transaction vk12 and assign your surchage :
        0 - 5000                      -
    > assign value 0
        5000 - 9999,9999         -
    > assign the value you want to be activate
    hope i made my self clear .
    BR
    ASA

  • Condition based on Input value by parameter

    Hi experts,
    I  am looking for a solution in crystal reports  in conjustion to BI . I m using Bex query directly for this report rathing creating an universe.
    I am trying to create a RKF based on parameter value by user's input.
    For example : - user input a date FROM-TO and than I am filtering minimum and maximum value . Based on these 2 values I have to restrict a KF Sales amount.
    Whenever I try to do like this in formula I get this error. Can someone help me in that please ?
    if  ({ZCRETA_ZZCRETA_Q_001_TEST.[ZCALMTH]} <= {@Min}) then {ZCRETA_ZZCRETA_Q_001_TEST.[Measures]-[D6T7LZ8YG3KSRHCE821ZX1WVY]}
    I also tried while do as well but did not work.Bascially I am trying to do something like this
    If Calmonth <= Min ( already filtered by me from parameter's value ) than display sales amount.
    As per this logic I should be able to see all the sales amount wherver Calmonth is less than of equal to minimum value of Calmonth.
    Thanks in Advance,

    Hi, your statement is looking at a formula, not a parameter
    f ({ZCRETA_ZZCRETA_Q_001_TEST.ZCALMTH} <= {@Min}) then {ZCRETA_ZZCRETA_Q_001_TEST.Measures-D6T7LZ8YG3KSRHCE821ZX1WVY}
    If it was a parameter it should look like this
    if ({ZCRETA_ZZCRETA_Q_001_TEST.ZCALMTH} <= {?Min}) then {ZCRETA_ZZCRETA_Q_001_TEST.Measures-D6T7LZ8YG3KSRHCE821ZX1WVY}
    you may also need to add the else.

  • Conditional links on report w/ search

    I know there has a number of thread on this topic, but I could not find any addressing my issue.
    I have a report with a conditional link built into the SQL:
    select DECODE(LL_ACCESS, 'edit',
    '<img src="/i/edit.gif" border="0" alt="Edit Icon">',
    '<img src="/i/view.gif" border="0" alt="View Icon">') LL_ACCESS
    ,DIVISION
    ,LL_DATE
    ,CUSTOMER
    ,PROGRAM
    ,PROCESS
    ,MATERIAL
    ,PART_DESC
    ,DEFECT
    ,PROBLEM
    ,ROOT_CLAUSE
    ,SOLUTION
    ,COMMENTS
    ,ATTACHMENTS_YN
    from LESSONS_LEARNED_V;
    Which "links" to either an update page or a view only page based on a user ACL.
    My problem arises when I'm adding a search feature to the report. I have change the report to be base on a PL/SQL statement:
    declare
    l_sql varchar2(4000);
    begin
    l_sql := '
    select DECODE(LL_ACCESS, ''edit'',
    ''<img src="/i/edit.gif" border="0" alt="Edit Icon">'',
    ''<img src="/i/view.gif" border="0" alt="View Icon">'') LL_ACCESS
    ,LL_ID
    ,DIVISION
    ,LL_DATE
    ,CUSTOMER
    ,PROGRAM
    ,PROCESS
    ,MATERIAL
    ,PART_DESC
    ,DEFECT
    ,PROBLEM
    ,ROOT_CLAUSE
    ,SOLUTION
    ,COMMENTS
    ,ATTACHMENTS_YN
    from LESSONS_LEARNED_V';
    IF :P2_REPORT_SEARCH is NOT NULL THEN
    l_sql := l_sql ||' where ';
    l_sql := l_sql ||' (
    upper("DIVISION") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("LL_DATE") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("CUSTOMER") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("PROGRAM") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("PROCESS") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("MATERIAL") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("PART_DESC") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("DEFECT") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("PROBLEM") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("SOLUTION") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("COMMENTS") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("ROOT_CLAUSE") like ''%''||upper(:P2_REPORT_SEARCH)||''%''
    END IF;
    if :P2_VALUE IS NOT NULL then
    l_sql := l_sql ||' and ('||:P2_CHART_FILTER||' = :P2_VALUE) ';
    end if;
    return l_sql;
    end;
    It almost works, except the pk value (in this case LL_ID)is not being returned in the link. I have tried every possible combination of #,&,||,'," to get it to work but with no luck. Does anyone know the correct syntax to get this to work?
    BTW, I'd like to thank all who have posted to this forum, it has been a create help to this old oracle forms guy.

    Hi Rob,
    Try this
    declare
    l_sql varchar2(4000);
    begin
    l_sql := '
    select DECODE(LL_ACCESS, ''edit'',
    ''<img src="/i/edit.gif" border="0" alt="Edit Icon">'',
    ''<img src="/i/view.gif" border="0" alt="View Icon">'') LL_ACCESS
    ,LL_ID
    ,DIVISION
    ,LL_DATE
    ,CUSTOMER
    ,PROGRAM
    ,PROCESS
    ,MATERIAL
    ,PART_DESC
    ,DEFECT
    ,PROBLEM
    ,ROOT_CLAUSE
    ,SOLUTION
    ,COMMENTS
    ,ATTACHMENTS_YN
    from LESSONS_LEARNED_V ';
    IF :P2_REPORT_SEARCH is NOT NULL THEN
    l_sql := l_sql ||' where ';
    l_sql := l_sql ||' (
    upper("DIVISION") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("LL_DATE") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("CUSTOMER") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("PROGRAM") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("PROCESS") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("MATERIAL") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("PART_DESC") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("DEFECT") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("PROBLEM") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("SOLUTION") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("COMMENTS") like ''%''||upper(:P2_REPORT_SEARCH)||''%'' or
    upper("ROOT_CLAUSE") like ''%''||upper(:P2_REPORT_SEARCH)||''%''
    END IF;
    if :P2_VALUE IS NOT NULL and :P2_REPORT_SEARCH is not null then
    l_sql := l_sql ||' and ('||:P2_CHART_FILTER||' = :P2_VALUE) ';
    elsif :P2_VALUE IS NOT NULL and :P2_REPORT_SEARCH is null then
    l_sql := l_sql ||' where ('||:P2_CHART_FILTER||' = :P2_VALUE) ';
    end if;
    return l_sql;
    end;
    I changed the refrenece from #LL_ID# to a direct sql reference. Also I modified your last if condition.
    Hope this Helps
    Vivek

  • Change the row colors based on column values in MOSS 2007.

    Hi Team,
    I am using MOSS 2007 environment. In that I am having one SharePoint list. In that list based on column values rows colors need to change.
    Kindly help me anyone on this.
    Thanks,
    Ashok

    Hi Ashok,
    Please follow the below link:
    http://www.contentmaster.com/sharepoint-2010/conditional-formatting-of-list-views-for-sharepoint-2010-changing-the-font-colour/
    http://sharepoint.stackexchange.com/questions/7478/highlight-row-color-based-on-field-values-in-sharepoint-2010-list-view
    Best Regards,
    Brij K

Maybe you are looking for

  • Sales order qty

    Dear all   i maintained lumf for the material ,  requirement is sales order will be valid for 6 months , for that iam trying to  create quantity contract in va41 system is showing error message  "No item category available (Table T184 ZKP2 LUMF  ) ""

  • Upgraded to 10.5 and now doesn't wake up

    Hey guys, Recently I gave in and installed 10.5 from 10.3.9. I really didn't want to as it's been working perfectly since I brought it, the original battery and HD are still going strong but I recently I brought myself a new iPod Nano and it needed i

  • No access to https websites

    Hello everybody, since a few day I can no longer access to https websites. Can anybody helb me?

  • Create Role Option in CUP 5.3

    HI, I would like to know the use of Create Role option in CUP. We have this option Configuration -> Roles -> Create Role. As we know we import roles form either SAP back-end system or ERM. In this case what is the use of Create Role option. Thanks in

  • Touchscreen stops responding in Mail app?

    This started happening yesterday - haven't recently updated iOS (still on 5.1.1) or installed any new apps etc.... I'll open the Mail app, be browsing messages etc, and all of a sudden I can't type or click any of my messages or any other buttons in