0

Choice change - Order status

I have single order with multiple partnumbers, and order has it's own status(choice) "Ordered", "Delivered".... also Every partnumber has also status(choice) "Ordered", "Delivered" ..etc..I'm trying to put a line in triger after update that would change whole order status(choice) if every single partnumber has changed status to "Delivered"..

 

Slika zaslona 2019-04-01 u 17.41.01

5 replies

null
    • mv900
    • 5 yrs ago
    • Reported - view

    i have have tryed this solution but second "if" function is working and first is not working. And they are the same. Don't understand why

    if concat('Nova pojedinacna narudzba'.'Naruceni artikli'.Status) like "Pristiglo" and not concat('Nova pojedinacna narudzba'.'Naruceni artikli'.Status) like "Naručeno" and not concat('Nova pojedinacna narudzba'.'Naruceni artikli'.Status) like "Isporučeno" then
    'Nova pojedinacna narudzba'.(Status := "Pristiglo")
    else
    'Nova pojedinacna narudzba'.(Status := "Naručeno")
    end;
    if concat('Nova pojedinacna narudzba'.'Naruceni artikli'.Status) like "Isporučeno" and not concat('Nova pojedinacna narudzba'.'Naruceni artikli'.Status) like "Naručeno" and not concat('Nova pojedinacna narudzba'.'Naruceni artikli'.Status) like "Pristiglo" then
    'Nova pojedinacna narudzba'.(Status := "Isporučeno")
    else
    'Nova pojedinacna narudzba'.(Status := "Naručeno")
    end

    • mv900
    • 5 yrs ago
    • Reported - view

    is it some option to add "elif" function on something like that, because i need to have multiple if functions

    • Jorg
    • 5 yrs ago
    • Reported - view

    Hi, 

    There is no direct elif function, but you can use also else if.

    Best, Jörg

    • Alexander_Koenig
    • 5 yrs ago
    • Reported - view

    You can also reach out to support@ninoxdb.de and we set up a screen sharing session.

    • Mconneen
    • 5 yrs ago
    • Reported - view

    AC Vuko d.o.o

    I would put logic in the part number's status After Update Trigger something like (code not tested)

    let t:=this;
    if count((select 'Part Number')[Status != 'Delivered']) = 0 then
         t.Order.Status := "Delivered";
    end
           

Content aside

  • 5 yrs agoLast active
  • 5Replies
  • 1625Views