1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

progress openedge error 215 (create in for each block)

Discussão em 'StackOverflow' iniciado por fdantas, Março 18, 2019.

  1. fdantas

    fdantas Administrator Moderador

    I'm trying to write code for this scenario: Go through every customer (customer table) to see if they were members year 2018 (I find that info in the membership table, year field). If there is not a membership that year I want to create it (create customer).

    My coding skills aren't great. I get error message 215 (not sure I can translate, but basically: create cannot be done on a 'each' modified post, something like that...).

    This is the code I have tried: FOR EACH customer NO-LOCK, EACH membership: IF CAN-FIND (FIRST membership WHERE membership.year = 2019) THEN DO: LEAVE. END. ELSE DO: CREATE membership. ASSIGN membership.year = 2018 .... fill the rest of the table.... END. END.

    Obviously I am doing it wrong. Suggestions would be very much appreciated!

    Continue reading...

Compartilhe esta Página