0

I am trying to display a 'progress bar' on a page which includes 5 different images. I would like to create a workflow where the image would change based on the completion of tasks in a task list. The list looks like this.

enter image description here

With the 'progress bars' looking like this.

enter image description here

Obviously i would only want one to show, based on the completion of the tasks shown above.

in lamens terms it would read somthing like this..

If [task name1] AND [task name2] AND [task name3] AND [task name4] AND [task name5] are  complete, display img1.jpg
else if
[task name1] AND [task name2] AND [task name3] AND [task name4] are complete, display img2.jpg
else if
[task name1] AND [task name2] AND [task name3] AND are complete, display img3.jpg

etc..

Is this the correct way to be thinking of it? How could i make this work using workflows?

0

This may not be the most optimal of efficient solution, but it's a workaround that could work. If you are just looking to change the images, then what you could do is create a column in your list that includes the paths to the 5 different image URLs. Display the path on the .aspx page, but make it hidden.

In your workflow, you could start it on the task list whenever an item is changed. The workflow will be constructed like:

(pseudo-code)
if setup-result is approved
    set pathToImg as "https://.../img1.jpg"
else if assess-result is approved
    set pathToImg as "https://.../img2.jpg

So know, whever you go to that page, the image path will be updated based on the results of the tasks. The path will be displayed on the webpage, but it will be hidden. You can then create a tag in your .aspx page that looks like:

<img src=document.getElementById("ID_of_pathToImg_element").innerHTML>

And, if it goes the way it does in my head, the path will be what it is set to in the workflow. If you only want one to display, you'll have to do it through scripts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.