?One + 1 anyone ?

That’s all I hope to achieve…

– Bardo


On 20.11.19 15.31 Uhr, Bardo Nelgen wrote:
Hi all,

I am really sorry asking for your time to "solve" such ordinary issue, but it seems I am completely incapable of doing a simple addition in SPARQL.

All I want to do is a loop-iteration to log the number of a procedure’s failed tries, abort if the outcome has finally been successful or mark it „failed“ after 3 attempts.

To me, the actual problem lies in the counting (second paragraph):
I know I do get the syntax wrong, but as of now could not figure out the correct approach…

    # make result boolean
    BIND(IF(?Result = 1 ,true,false)AS?Success).

    # calculate number of fails
    VALUES ?one {1}
    BIND(IF(?Success = true,?oldNumberOfFails,SUM(?oldNumberOfFails,?one))AS?currentNumberOfFails).

    # create current-state IRI
    BIND(IF(?Success = true,fac:complete,IF(?numberOfFailsOLD < 2,fac:requested,fac:failed))AS?currentState).

As always, help is highly appreciated !!

Best,

Bardo Nelgen



Reply via email to