Value from another table to a form

2»

Comments

  • sarmigsarmig Member Posts: 89
    I already checked. It doesn't change the status. If it was New, it stays New and if it was Certified, it stays Certified. What I wanted was to force it to become Certified.
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Try this
    IF NOT RecRoutingHeader.FINDFIRST THEN BEGIN 
    RecRoutingHeader."No." := "No. Macho";
    RecRoutingHeader.Description := Description;
    //RecRoutingHeader.Status := RecRoutingHeader.Status::Certified;
    RecRoutingHeader.INSERT;
    RecRoutingHeader.Status := RecRoutingHeader.Status::Certified;
    RecRoutingHeader.MODIFY;
    END ELSE BEGIN
    RecRoutingHeader.Status := RecRoutingHeader.Status::Certified;
    RecRoutingHeader.MODIFY;
    END;
    

    If not write this code at end
    RecRoutingHeader.Status := RecRoutingHeader.Status::Certified;
    RecRoutingHeader.MODIFY;
    
  • sarmigsarmig Member Posts: 89
    Great. It worked with those 2 lines of code at the end. Strange, because those two lines are repeated earlies in the trigger and it wasn't working. Thanks!!

    As for my final problem (I think I already wrote about that in this topic), when I press the arrow button down and then back up, the value in my TempoExecução field goes back to 0. It's like the value isn't stored. Do you have any idea why?
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Use
    TempoExecução := RecRoutingLine."Run Time";
    
    instead of
    TempoEx := RecRoutingLine."Run Time";
    

    I think TempoEx is a variable not field..
  • sarmigsarmig Member Posts: 89
    This one is solved. Thanks!
Sign In or Register to comment.