f: Validator field with dependencies on line table

Hi guys,.

I have a built with a custom SQL view object. I created a page with a table jsf, users can edit all fields and later this information he was send by webservice.

A field has a validator. This validator check if not equal 0. Now, I add a new condition, when the other field equals 0 then should not see the error.

Example:

Field1 Field2

2 0-> error, Field2 0 and Field1 is not 0.

Change Field2

2 1-> OK-> Field2 is not equal 0

Change Field2

2-> 0 error, Field2 0 and Field1 is not 0

Change Field1

0 0-> OK, Field2 0 but field1 0

I added a validator attribute, but it does work very well. I thought of using required field with groovy expression but it is not working properly, but when field2 is 0, it is compelled value.

I don't know how this implementation.

Any idea?

Thank you!

Kind regards.

Hello AlfreNet,

Sorry for the delay, but he questions and I m there (maybe all) do not get warnings in my Inbox (Inbox does not).

For the table, you can iterate trought the lines as its explained Timo Hahn in this post: Hello, I am using j developer 12.1.3 ;

On the action of the button, I think you can do as explained on that: Re: conditional Navigation on the CommandButton Action use EL? to only return the string to navigate when there are no validation errors, otherwise return null and show the message; (I have a request that the action of the button returns a string based on the review of the method and redirects accordingly, but I m not finding any to show you, sorry).

Kind regards

Carlos

Tags: Java

Similar Questions

  • [JDev12c, ADF] How to get the value of a field from the selected line in af:table and...

    Hallo,

    I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.

    I need to go to the second page the value of a field on the line that is selected on the first page.

    How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?

    Thank you

    F.

    Why would user, you need to pass a value of the line to the shape?

    The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.

    Timo

    Post edited by: Timo Hahn
    And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf

  • problem with validation in the field with the radio button type in create profile jsp page

    Hello

    Kindly help me with the validation of a field with the type option button in the createProfile jsp page. Its actually not to validate the sex with radio button field.

    The code is as follows...

    < % @ page language = "java" contentType = text/html"; charset = ISO-8859-1"

    pageEncoding = "ISO-8859-1" % >

    <! – this taglib used to access dsp tags - >

    < %@taglib uri = "" / dspTaglib "prefix ="dsp"% >"

    < dsp:page >

    < dsp:importbean bean = "/ atg/userprofiling/ProfileFormHandler" / >

    < dsp:importbean bean = "/ atg/dynamo/drop/ErrorMessageForEach" / >

      <! DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional / / IN" "http://www.w3.org/TR/html4/loose.dtd" > ""

    < html >

    < head >

    < meta http-equiv = "Content-Type" content = text/html"; charset = utf-8 "/ >"

    < title > < /title > user registration Page

    < / head >

    < body >

    < dsp:form id = "registerForm" method = "post" action = "registration.jsp" >

    < div >

    < div > if please fill in all fields below and click Save

    button. < / div >

    < br / >

    < table >

    < tbody >

    < b >

    < td width = "150" > name < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.firstName"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    Last name < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.lastName"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    < td > username < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.login"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    password < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.password"

    MaxLength = "30" size = "25" type = "password" required = "true" / > < table >

    < /tr >

    < b >

    < td > confirm password < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.password"

    MaxLength = "30" size = "25" type = "password" required = "true" / > < table >

    < /tr >

    < b >

    Identification of Email < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.email"

    MaxLength = "30" size = "25" type = "text" required = "true" / > < table >

    < /tr >

    < b >

    Sex < td > < table >

    < td > < dsp:input bean = "ProfileFormHandler.value.gender"

    Type = "radio" required = "true" > male < / dsp:input > < dsp:input

    Bean = "ProfileFormHandler.Value.Gender" type = "radio" "

    required = "true" > female < / dsp:input > < table >

    < /tr >

    < b >

    < td colspan = "2" > < dsp:input bean = "ProfileFormHandler.create"

    Type = "submit" value = "Save" / > < dsp:input

    Bean = "ProfileFormHandler.createSuccessURL" type = "hidden"

    value = "index.jsp" / > < table > "

    < /tr >

    < b >

    < td colspan = "2" >

    < ul >

    < dsp:droplet name = "ErrorMessageForEach" >

    < dsp:param bean = "ProfileFormHandler.formExceptions"

    name = 'exceptions' / >

    < name dsp:oparam = "output" >

    < li > < dsp:valueof param = "message" / > < /li >

    < / dsp:oparam >

    < / dsp:droplet >

    < /ul >

    < table >

    < /tr >

    < / tbody >

    < /table >

    < / div >

    < / dsp:form >

    < / dsp:page >

    < / body >

    < / html >

    Use code next, may be you do not value attribute set and causing a problem (data inconsistency problem) or case mismatch while storing data in the repository.

    <%Boolean checked = true;%>

    Sex:

    Male

    Female

    I do not know what will radio back button if the value is specified: a boolean value or the value aim to display (in your male cases),.

    If the problem is fixed, undo the change and please let me know what value he sent in your case.

    Please

    Thank you

    Nitin.

  • How can I change the pdf file cannot be modified, but hold down the scroll button for the form fields with multiple lines?

    I need all the information to display so I need the scroll key to work, but it is not editable.

    Thanks for the help!

    Tania

    You can define a field with strike and validate to prevent the user from changing the value of the field. First, set the field to multiline and 'Scroll long text' and the default value for the text to display in the field. Then add a custom script to strike which is:

    Custom keystroke script

    Event.RC = false;

    and to be complete, the validation script customized according to:

    Custom validation script

    If (event.value! == event.target.defaultValue) event.rc = false;

    These scripts will prevent the value to be changed, at least in Acrobat and Reader if JavaScript is enabled.

  • How to add an animation to a text field with two lines?

    I have a text field with two or more lines. Why is it not possible now to apply a text animation?àpe_textfield.jpg

    Animating text, by design, only works on a single line of text.

    To use it for multiple lines, you can either create two separate titles or keyframing to create your own animation effect.

  • Separate the merge fields with tabs, how to remove if there is no data

    Hello

    I have a document of Idesign which merges the field from a csv file. Merging documents fields are separated by a tab, for example:

    {1001} {1002} {1003}

    {2002} {2003} {2001}

    {3001} {3002} {3003}


    etc.

    In some cases there is no data available in the csv file. This translates into a line blank in the document with only 2 tabs. Because the actual number of letters generated is huge to delete empty lines. How to solve this problem? Is there a way to only use the tabs if there is data in the fields and remove the line if no data is available?

    This string GREP only matches lines that contain nothing but the tabs and not match any line that made a valid data entry. If you used regular and right indent tabs you need to change to ^ [\t~y]+\r

  • I'm trying to create a PDF file with several signature lines in that anyone can "Sign" by using their digital signature CAC (Common Access Card) active. The goal is to have a single document that people can open, sign on a designated line and save the doc

    I'm trying to create a PDF file with several signature lines in that anyone can "Sign" by using their digital signature CAC (Common Access Card) active. The goal is to have a single document that people can open, sign on a designated line and save the document (replacing the existing document) and close. Then another person can open the same document digitally sign another area of the form, save it, and close it. So on, and so on. Is there a way to do this? At the end of the day, I would end up with a PDF file with literally hundreds of signatures to enable different ACC everywhere...

    I don't understand what the problem is. In the post of the davidr96549424 on May 8, 2015 07:58 you presented a structure of a correct document. Is the issue of the creation of this structure in a PDF file? For this, you will need an Acrobat, not reader.

    XI in Acrobat, select Tools-> forms-Edit. Click 'No' on the form fields 'detect '. In the tasks Panel that opens, click on "add new field". Select "Digital Signature" and move it to the location in the document where you want to than the appearance of the signature to be. Repeat that for signature fields as you want. Users will sign by clicking on the prepared unsigned signature field which shows the dialog box "sign. Do not forget that as TSN has noted that a digital signature applies to the entire document. The entry in the document where it is is irrelevant. Each next signature covers all previous signatures.

    Your users can also sign a document from anywhere that they want without signature fields already prepared. For this select fill & sign-> work with certificates and the type of signing you want to sign up with. A dialog box that will tell you a rectangle for the appearance of signature rises and after you draw the rectangle of the dialog 'Sign' rises.

    PDF/Acrobat doesn't have a limit on a number of signatures in a PDF document. But! Don't forget that when you open a PDF file with Acrobat/Reader signatures valid all of them and takes time (several seconds - until 10 - for every signature), so if you have several signatures of dozens of their validation open can take a long time.

    I don't know how build you your workflow so that each person signs the same PDF and saves it. Economy runs on the same computer where the PDF is stored. You'll have to decide how to allow different people to have access to the same PDF. They, of course, you may sign this only one-at-a-time PDF.

  • Help to combine the two queries with dependencies

    Combining two queries with dependencies:
    First ask: Returns USER_ID that has a type of access to a table with the OWNER (I also shoot the TLA of the USER_ID standard: ' of TLA #)

    Select distinct SUBSTR (DBA_USERS. Username, 2, 3) AS TLA

    DBA_USERS. Username USED_ID

    DBA_TAB_PRIVS. Owner OWNER

    from DBA_USERS

    DBA_ROLE_PRIVS

    DBA_TAB_PRIVS

    where DBA_USERS. Username = DBA_ROLE_PRIVS. Dealer

    and DBA_USERS.default_tablespace not in ('SYSTEM', "SYSAUX")

    and DBA_USERS. Username like would be %'

    and DBA_ROLE_PRIVS. Granted_role = DBA_TAB_PRIVS. Dealer

    and SUBSTR (DBA_USERS. Username, 2, 3) <>DBA_TAB_PRIVS. Owner

    ;

    Example of results (red font used in the last citation):

    TLA USED_ID OWNER

    --- ------------------------------ ------------------------------

    DGTX999 GTX GRR

    DGTX999 GTX ABG

    DGTX999 GTX HTC

    FWS DFWS999 GRR

    OCN DOCN999 GRR

    RHR DRHR999 DAS

    ETM DETM999 DAS

    FWS DFWS995 DAS

    CD DCDS999 DAS

    ABE DABE999 DAS



    Second request: matches the USER name (same standards as above) and MACHINES (filter PC connections) and the number of connections made of

    Select DBA_USERS. Username

    DBA_HIST_ACTIVE_SESS_HISTORY. Machine

    COUNT (*) AS CONN_COUNT

    of DBA_HIST_ACTIVE_SESS_HISTORY

    DBA_USERS

    where DBA_HIST_ACTIVE_SESS_HISTORY. User_id = DBA_USERS. User_id

    and DBA_USERS. Username like would be %'

    and DBA_HIST_ACTIVE_SESS_HISTORY. Machine not as "WINAD%\%-%".

    Group of DBA_USERS. Username

    DBA_HIST_ACTIVE_SESS_HISTORY. Machine

    order by 1

    3 desc;

    Example of results (red font used in the last citation):

    MACHINE CONN_COUNT USERNAME

    --------------- ------------------------- ----------

    DFWS999 home13e0 7557

    DGAM800 vu1246 37

    DGAM999 vu1246 2558

    DABE999 back18cb 4639

    DINL888 home162f 84

    DFWS999 WINDAD\OMHQ58BF 178

    DCDS999 back18cb 788

    DGTX999 home18c8 7

    DGTX999 home13d3 62

    DOCN999 vu1261 44

    DFWS999 back1976 3

    DCDS999 home18c8 173

    DGTX999 home19c9 13

    What I'd like to have (just made two first USER_IDs from the first query) (COL duplicated for each separate owner 1-4).  So 3 machines and 3 owners would result in 9 lines (I could reorganize the collar and use a 'pause'):

    TLA USED_ID MACHINE CONN_COUNT OWNER

    --- ------------------------------ ------------------------- ---------- ------------------------------

    GTX DGTX999 home13d3 62 GRR

    Home18c8 GTX DGTX999 7 GRR

    DGTX999 GTX home19c9 GRR 6

    GTX DGTX999 home13d3 62 ABG

    DGTX999 GTX home18c8 ABG 7

    DGTX999 GTX home19c9 6 GBS

    GTX DGTX999 home13d3 62 CTH

    DGTX999 GTX HTC 7 home18c8

    DGTX999 GTX home19c9 6 HTC

    FWS DFWS999 home13e0 7557 GRR

    FWS DFWS999 WINDAD\OMHQ58BF 178 GRR

    FWS DFWS999 back1976 GRR 3


    So it would be logically read: TLA as USER_ID of MACHINE, CONN_COUNT consultation times: OWNER information.

    Thought as only those with the necessary values. Just try this and let me know in the case of all conflicts in the output.

    WITH T1 AS)

    Select distinct SUBSTR (DBA_USERS. Username, 2, 3) AS TLA

    DBA_USERS. Username USED_ID

    DBA_TAB_PRIVS. Owner OWNER

    ROWNUM RN

    from DBA_USERS

    DBA_ROLE_PRIVS

    DBA_TAB_PRIVS

    where DBA_USERS. Username = DBA_ROLE_PRIVS. Dealer

    and DBA_USERS.default_tablespace not in ('SYSTEM', "SYSAUX")

    and DBA_USERS. Username like would be %'

    and DBA_ROLE_PRIVS. Granted_role = DBA_TAB_PRIVS. Dealer

    and SUBSTR (DBA_USERS. Username, 2, 3) <> DBA_TAB_PRIVS. Owner),

    () AS T2

    Select DBA_USERS. Username

    DBA_HIST_ACTIVE_SESS_HISTORY. Machine

    COUNT (*) AS CONN_COUNT

    of DBA_HIST_ACTIVE_SESS_HISTORY

    DBA_USERS

    where DBA_HIST_ACTIVE_SESS_HISTORY. User_id = DBA_USERS. User_id

    and DBA_USERS. Username like would be %'

    and DBA_HIST_ACTIVE_SESS_HISTORY. Machine not as "WINAD%\%-%".

    Group of DBA_USERS. Username

    DBA_HIST_ACTIVE_SESS_HISTORY. Machine

    order by 1

    3 desc)

    SELECT T1. TLA

    ,         T1. USED_ID

    ,         T2. MACHINE

    ,         T2. CONN_COUNT

    ,         T1. OWNER

    FROM T1

    T2

    WHERE T1. USED_ID = T2. USER NAME;

  • Text field with AutoComplete is always NULL

    Greetings,

    I am new to Apex, so I don't know I'm missing something obvious. I use Apex 4.0.1 what I've done is created a form on a page of table and added a new text with page of AutoComplete element. This new field of text does not match a column in the table. What I'm trying to do, is allow the user to use the AutoComplete feature to make a choice. Then when the user submits the page, I want to use the substr function on the value of the field of AutoComplete and fill one of the fields in table. I tried using the PL/SQL functions in validations and calculations, but I found that the autocomplete field value is always NULL. I can access the other fields that are associated with a fine table column. It must be something simple. Thanks for your help.
    Page Items
    P2_F1  - text field with auto complete. Not associated with a table column
    P2_F2 – Text field. Is associate with a table column
    This is what I want to do:
    
    Entered this in a validation
    begin
    if :P2_F1 is not null then
       :P2_F2 := substr(:P2_F1,1,5);
    end if;
    end;
    Thanks again

    Published by: LRM on 22 January 2011 17:25

    Hello

    In calculations, you must use:

    Item name: P2_F2
    Type: SQL Expression
    Point calculation: after submit
    calculation: substr(:P2_F1,1,5)
    Condition type: the value of element in the expression is not null
    Expression 1: P2_F1

    Kind regards

    Patel Kartik
    ---------------------------------------------------------------
    http://patelkartik.blogspot.com/
    http://Apex.Oracle.com/pls/Apex/f?p=9904351712:1

  • Pages / Question: printing black fine lines table in black instead of halftones

    Hello community,

    someone know how to print tables with fine black (i.e. below 1 point) lines without halftoning of pages?

    I tried on several printers (laser and ink-jet, color as well as PC, usb and network connections).
    No matter what line table below 1pt is pure black halftone instead.

    It affects only the rows in the table. Forms with fine lines, small texts, etc. are okay.

    Any ideas? Help, please.

    Hi fraha,

    Try this. First turn off the grid.

    Now apply cell borders

    Print Preview

    Please answer if that is not what you want.

    Kind regards

    Ian.

  • String concatenation with a new line

    Hey,.

    I'm doing something that I considered quite simple but hit a few problems.  I'm looping through an array of strings and concatenting them with a new line separator and put the result to the Clipboard string so that it can then be pasted into a field. The problem is what is the sign of a new line separator?  I tried:

    « \n »

    '\r' + '\n'

    « \n »

    System.getProperty ("line.separator");

                  String txtToPaste = "";
                    String eol = System.getProperty("line.separator");
                    for (int entryIndex = 0; entryIndex < entries.length; entryIndex++) {
                        txtToPaste += entries[entryIndex];
                        // if we are not the last entry then add a new line
                        if (entryIndex < entries.length) {
                            txtToPaste += eol;
    
                        }
                    }
    

    What is the right way to build a string with newlines inside?

    Thank you.

    something like txtToPaste = entries [entryIndex] + "\n"; might solve your problem.

  • How to create the equivalent of 'field with AutoComplete text' in a report updated

    I have a region based on a relationship of type "SQL Query (updateable report)". "

    The table that the report is based on a a comment field that users should be able to update.  Currently, it is defined as ' display as '-text field, to allow users to change.

    I want to be able to provide users a standard set of comments from which they can choose, if they wish, OR to put in another comment or to choose a standard comment and change, that is very much like a drop-down list box.

    Other types of fields can be defined as "text field with AutoComplete", which would be fine if I could put it on this area, but in such field, on this type of regions, it is not possible.

    Is it possible that I can create a work around to get the same effect.

    Thank you

    Dave

    Hello

    It turns out that due to my need is satisfied by the standard features.

    I was looking for "offering users a standard set of comments from which they can choose, if they wish, OR to put in another comment or to choose a standard comment and change, IE a lot as a combo box"

    The answer is a Popup LOV.  (As opposed to a Select list).

    Selecting a popup LOV will bring back the text in the field AND ALLOW the EDITION. And if you do not use the context menu, you can always change the field.

    If you want to get AutoComplete on it as well, then try code of Jari.

    Dave

  • Fill a field with the results of the other (sort and add custom text)

    I have a PDF form with many fields popup asking 'Yes', 'Maybe' or 'no '. I need a way to collect the answers and sorting, all the 'yes' first of all, that all the 'maybe', all the 'no '. When I need after that sort of response of three, is put in a 'Results' field with the container of the ToolTips for each popup and the ability to add a "BOLD" text, between three sorted responses.

    I have found some javascript in the forum here to collect data from field only. It seems to be easy to modify if you have several fields to collect/sorting/extract.

    Assistance or management to do will be appreciated.

    Thank you!

    Assuming that you have 50 menus named A1, A2... A50 and each drop-down list has three elements (Yes, maybe, no), you could do something like:

    Initialize object to contain the info of the answer

    var oResponse = {}

    'Yes': [],.

    "Maybe": [],.

    ['No':]

    };

    var i, f;

    Browse fields (A1, A2... A50)

    for (i = 1; i<= 50;="" i="" +="1)">

    Get a reference to the current field

    f = getField ("A" + i);

    Add ToolTip text of the current field to the corresponding table in the response object

    oResponse [f.valueAsString] .push (f.userName);

    }

    Generate the output string

    aOutput var = [];

    If (oResponse ['yes'] .length > 0) aOutput.push ("It's the priority YES\r" + oResponse ["Yes"] .join ("\r"));

    If (oResponse ["Maybe"] .length > 0) aOutput.push ("It's the priority MAYBE\r" + oResponse ["Maybe"] .join ("\r"));

    If (oResponse ['No'] .length > 0) aOutput.push ("It's the priority NO\r" + oResponse ["No"] .join ("\r"));

    Enter the results

    getField("Results").value = aOutput.join("\r\r");

  • Result of text SQL with Chr (10) (line break) NOT carried over to the HTP. P Javascript Mailto

    [4.2.1.00.08 Express application.]

    Hello, Super gurus!

    Maybe I am still not able to wrap my head around quotes and concatenations, as in this post Re: Mailto PL/SQL block with window.location.href, I would like to ask for your help again.

    I can't get a NEW LINE character to work in my htp.p & javascript.

    Full article: it is an extension of what I worked on, as shown in the link above.  This time, I called a request similar, as shown below, of my 'after Submit PL/SQL anonymous block ' process:

    DECLARE
    TYPE emp_aat IS TABLE OF THE emp % ROWTYPE;
    l_employees emp_aat;
    v_result varchar2 (5000): = ";
    BEGIN
    SELECT *.
    LOOSE COLLECTION l_employees
    WCP
    ORDER BY ename;

    BECAUSE me in 1... l_employees. COUNTY
    LOOP
    v_result: = v_result | l_employees (i) .ename | ' -  '
    || ' Job: ' | l_employees (i) .job | ' ';
    || Chr (10);
    END LOOP;
    Dbms_output.put_line (v_result);
    END;

    The above works well with the Chr (10), where each outcome starts on a new line:

    ADAMS - job: CLERK

    ALLEN - job: SALESMAN

    BLAKE - job: MANAGER

    CLARK - job: MANAGER

    Further down on my PL/SQL block process, the problem I have is that I can not get the v_result is displayed as you like, with the new line:

    HTP.p ("< body > '");

    HTP.p ("< script type =" text/javascript "> '");

    HTP.p ('window.location.href = "mailto:" |) v_logged_on_user_email | ';'

    ||'? "subject = salary increase Request"

    |' & cc ='

    || v_hr_email

    ||';'

    |' & body = '
    ||' \n "

    ||' Two hundred per cent increase for these people to chance! "

    ||' \r\n "

    || v_result

    ||'";'

    );

    HTP.p ("< /script >" ");

    HTP.p ("< /body >" ");

    As a matter of fact, these '\n' and '\r\n' above do seem to not work at all.  And the body of my email has just 1 big piece:

    ADAMS - job: COMMITTED ALLEN - job: SALESMAN BLAKE - job: MANAGER CLARK - job: MANAGER

    Issues related to the:

    -Should I replace "Chr (10)" in my SQL query with something so that javascript would recognize?

    -How is "\n" does not work as expected?

    Please let me know if I did something wrong with the foregoing, and that can be done to correct it.

    Thank you very much!

    It is a HTML problem, you will get best responses from stackoverflow.

    Try % OA

    HTML - mailto link several lines of body - Stack Overflow

  • Problems with the filling of a text field with 2 other fields data


    I have 3 domains Tools_1a_pri, Tools_1a_pri_other, Tools_1a_pri_txt.

    Tools_1a_pri is a drop-down list box with a predefined list. One of the options is the 'other '.  If 'Other' is selected, the text Tools_1a_pri_other field becomes visible for users to enter the name of the other tool.

    The Tools_1a_pri_txt is a text field with a calculation that shows a text indicating that no tool has been selected or the Tools_1a_pri & or Tools_1a_pri_other.

    When I select one of the predefined tools, everything works.  When I choose the other, it seems that nothing has changed.  Must I click another field before.  It's confusing for the user.

    Tools_1a_pri validate code
    this.getField("Tools_1a_pri_Other").display = event.value is "Other"? Display.visible: display.hidden;

    Computer Tools_1a_pri_txt code
    If nothing is selected, follow these steps
    If (getField("Tools_1a_pri").value.length < 2) {}
    event.target.textColor = color.red
    Event.Value = "no identified main tool";
    } else if (getField("Tools_1a_pri").value! = 'Other') {}
    If not do that if the other is selected
    event.target.textColor = color.black
    Event.Value = getField("Tools_1a_pri").value;
    } else if (getField("Tools_1a_pri").value = 'Other') {}
    If not do so if the other is not selected
    event.target.textColor = color.black
    GetField("Tools_1a_pri").value = Event.Value + "-" + getField("Tools_1a_pri_Other").value;
    }

    You have made the classic mistake of using the assignment operator in a statement instead of the comparison operator. Change this line:
    } else if (getField("Tools_1a_pri").value = 'Other') {}

    To do this:

    } Else if (getField("Tools_1a_pri").value == 'Other') {}

Maybe you are looking for