The code for the script editor looks like this:
<table border="0"> <tr> <td> <a href="https://contoso.sharepoint.com/sites/subsite/SitePages/Project%20Dashboard.aspx?ProjectName=CS1"> <img src="https://contoso.sharepoint.com/sites/subsite/Project%20Pictures/cs1.png" height="78" /></a> </td> </tr> </table>
Basically I want to replace this script editor with some custom code. I think a content editor running a script would work well, but I am not sure how exactly to query the objects.
Basic gist of how it should work: Query the list of projects, looking in the "active" (yes/no) column. If the project is active, go to the ProjectPicture column and copy the URL of the picture, as well as the parameter for said project. The parameter for the site is ProjectCode.
For example, let's say Project1 is active. Then we should pull the picture url (URL points to a picture library) for project1. Also, save the parameter "PROJ1". Then, create a picture that when clicked on goes to ProjectDashboard.aspx?ProjectCode=PROJ1.
This process should put up a picture for each of the projects that are active in the project profile.
I am trying to pull in the records where the Active field = yes, and then just alert the number of elements found as well as the data I want in them. However, the alert box isn't popping up, telling me the onQuerySucceeded isn't doing what it is supposed to. Below is the code I am trying to use, and I have been testing it in a script editor. As far as the CAML query goes, I have tried using Bool, Boolean, Text, and Integer to try and get it to work with no avail.