4 Replies Latest reply on May 12, 2014 6:28 AM by philmodjunk

    Add data to text field and continue adding to same text field as test 2 and test 3

    naumansyed

      Title

      Add data to text field and continue adding to same text field as test 2 and test 3

      Post

           Hello, 

           I have a text field called "test List". I want to add different Test with different information to this field. Is it possible without using Portal. What I would like to do is after selecting test description, test conditions, shift limit, and equipment use ADD button to display data from above fields in test list field. where i am having trouble is continue putting data into test list as T2, T3, etc.

           Example:

           T1 test description

           test conditions

           shift limit

            equipment

           T2

           T3

            

           Thanks

            

               

                

               

                

            

            

      Untitled.png

        • 1. Re: Add data to text field and continue adding to same text field as test 2 and test 3
          symbister

               Hi

               Sounds like you want to string together contents of text fields? Have a search for concatenating fields in FM Help.

               Then you can use a script on the ADD button, to Set the testlist Field to a string of field contents and literal text.

               so if testlist contains the text "Sample", testdescription contains the text "Survey" and testconditionsline1 contains the text "Normal"

               Set Field [yourtable::testlist ; yourtable::testlist & "CR {use carriage return symbol}" & "T1 " & testdescription & " " & testconditionsline1] 

               will produce:

               Sample
               T1 Survey Normal

                

                

          • 2. Re: Add data to text field and continue adding to same text field as test 2 and test 3
            philmodjunk

                 While this can be done, what problem is solved by not using a portal?

                 This would seem made to order for a portal and the related table of records produced by such a portal is, in general, a much more flexible way to manage such a list of data.

                 If TestList were a calculation field or a text field with an auto-enter calculation specified (with the "do not replace existing value..." option cleared), it might use this calculation:

                 List ( Test Condition line 1 ; Test Condition line 2 ; Test Condition line 3 ; Test Condition line 4 )

                 to combine the values of the 4 separate fields into a single field with the text from each field on a different row of text in the field.

                 But this seems a very poor second best to using a related table and a portal.

            • 3. Re: Add data to text field and continue adding to same text field as test 2 and test 3
              naumansyed

                   Thanks for posting and giving me some ideas. I was able to do this by using Insert Calculated Result on a script

                   "T1 " & GetAsText ( ResTest::test description ) & "¶"   &

                   "----------------------------------" & "¶"   &
                   "C1    " & GetAsText ( ResTest::test condition line 1 ) & "¶"  & 
                   "C2    " & GetAsText ( ResTest::test condition line 2 ) & "¶"  & 
                   "C3    " & GetAsText ( ResTest::test condition line 3 ) & "¶"  & 
                   "C4    " & GetAsText ( ResTest::test condition line 4 ) & "¶"  &
                   "S1    " & GetAsText ( ResTest::shift limit ) & "¶"  &
                   "E1    " & GetAsText ( ResTest::equipment line1 ) & "¶"  &
                   "E1    " & GetAsText ( ResTest::equipment line 2 ) & "¶"  &
                   "E1    " & GetAsText ( ResTest::equipment line 3) & "¶"  &
                   "E1    " & GetAsText ( ResTest::equipment line 4 ) & "¶"  &
                   "=========================" & "¶"  &
                   "T2"
                   I am still having trouble after selecting information for T2 and adding to my test list end of T1. I might just have to go with portal and hope all the info. I need to display fit in it.
                    
                    

                    

              • 4. Re: Add data to text field and continue adding to same text field as test 2 and test 3
                philmodjunk

                     Since a portal can have a scroll bar, there is no real limit to the amount of data that can fit into it. And there are ways to make a portal's number of rows adjust down to smaller numbers of rows when printing or saving as PDF.