0

I Need to update field in another table.

I Need to update field in another table.

On Document I have te 'projCod' field  and need to update on table 'Control Deliverables' on fleld 'projCod' only update no duplicate.

7 replies

null
    • Fred
    • 7 mths ago
    • Reported - view

    Since you said you want to update data, then you need to first put in a variable the correct record Id of the record in Control Deliverables. You can do a select or use appropriate reference links.

    Then once you have the appropriate record data, then you can use the variable to start updating fields in the record.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 7 mths ago
      • Reported - view

       hi Fred.

      let myTable1 := Id;
      let myText := projCod;
      for i in (select 'Control Deliverables')[projCod = myText] do
          i.(projCod := myTable1)
      end
      

      I try this but don't work something wrong.

      • Fred
      • 7 mths ago
      • Reported - view

      1) does the select find the correct records?

      2) if #1 is ok, then what is the issue going on?

      • Rafael Sanchis
      • Rafael_Sanchis
      • 7 mths ago
      • Reported - view

       

      Hi Fred maybe very easy but can,t find the solution.

      • Fred
      • 7 mths ago
      • Reported - view

       Please answer my questions above so we can help you.

    • John_Halls
    • 7 mths ago
    • Reported - view

    Hi Rafael

    You ae scoping by a text field 

    [projCod = myText]

    But then assigning an Id to the same field

    i.(projCod := myTable1)

    I am guessing the Id has to be assigned to a relationship field instead

    Regards John

    • Rafael Sanchis
    • Rafael_Sanchis
    • 7 mths ago
    • Reported - view

    Yes the projCod is a text field

    I can't find the script

Content aside

  • Status Answered
  • 7 mths agoLast active
  • 7Replies
  • 75Views
  • 3 Following