Menu

Counter based on a indirect link

Sergi
2021-10-19
2021-10-27
  • Sergi

    Sergi - 2021-10-19

    Hi,
    I'm trying to create a % counter in my licence class based on an indirect link class between licence and person (lnkPersonToLicence), then divided by the max instances of that licence.
    I have my logic on the Licence OnUpdate method, but it doesn´t get que changes on the Person's list when I modify it, then when I do another modification of the correct values are displayed.
    If I put my logic on the AfterUpdate, I can see on the logs that the calculations are correct, but then they don't get saved into the DB, and I cannot do a DBUpdate() on the AfterUpdate because it's not working to protect against infite loops.

    Anybody has tried this? Any workarounds?
    On the OnUpdate can I get the list of indirect links that will be created and deleted?
    Thanks!!

     
  • Vincent @ Combodo

    Would this tutorial help you to achive your use case?
    They are a few others in the same domain

     
  • Sergi

    Sergi - 2021-10-27

    Hi Vincent,
    I was in the situation descrived as 'Pitfall', in the tutorial :D
    My case was slightly different, but once i understood the workaround for this pitfall I could adapt it for my case.
    Thank a lot!!!

     
  • Vincent @ Combodo

    Thanks to see it helps !

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.