PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10/29/2014 11:12 AM by  wwhite1
Design Studio - assigning a value to detail row
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
wwhite1
Sr Engineer
Private
New Member
(4 points)
New Member
Posts:2


Send Message:

--
10/29/2014 9:19 AM

    Hi,

    I am new to Design Studio and I am creating a custom form for our users to record missed punches.  On my form, I have 5 detail rows where a user can update data.  I have also created a button called "Clear Form" so that the user can click this button and reset all of the fields in the detail area to spaces (blank).

    I've created a function called Clear which I have mapped to my "Clear Form" button to reset all fields/rows in my detail area.  I've haven't been able to get all of my fields/rows to reset to spaces when the user clicks on the "Clear Form" button.  I have only been successful as resetting the fields in the 1st row.

    Any help would be greatly appreciated.  I've tried so many different things but nothing has worked.  Below is the coding that I have (right now) for the Clear function.

    function Clear()
    {
    // when user clicks on Clear Form button, set all fields in
    // detail area to space - user wants to start over with entry

    // works but only for row 1
            lawForm.setFormValue("text5","");

    // doesn't work
     lawForm.setDataValueById("text5","",0);
     lawForm.setDataValueById("text5","",1);

    // doesn't work
            lawForm.setDataValueById("_f16r0","",0);
            lawForm.setDataValueById("_f16r0","",1);

    }

     

    Terry P
    Private
    Private
    Veteran Member
    (612 points)
    Veteran Member
    Posts:234


    Send Message:

    --
    10/29/2014 10:36 AM
    You switched from setFormValue to setDataValueById

    This should work, but test on your own

    for (var rowNum = 0; rowNum < 5; ++rowNum)
    {
    lawForm.setFormValue("text5","",rowNum)
    }
    wwhite1
    Sr Engineer
    Private
    New Member
    (4 points)
    New Member
    Posts:2


    Send Message:

    --
    10/29/2014 11:12 AM
    This code works. Thank you for your help!
    You are not authorized to post a reply.