Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-07-2022 12:00 PM
Hi,
I can't figure out to display images in a Neodash report.
This is a simple query which looks up the logo ("mark") of people in my database:
MATCH (p:Producer)-[r:HAS_NAME_VARIANT]->(n:Name)
WHERE n.Name = $neodash_name_name
OPTIONAL MATCH (p)-[r2:HAS_PICTURES]->(i:Pictures {type: "mark"})
RETURN i.url
The "i.url" property contains the url for the image ( e.g. http://tapitta.be/wp-content/uploads/2022/12/I3mark_1.jpg).
In iFrame I get the error message "Invalid iFrame URL. Make sure your url starts with http://
or https://
."
Any help reatly appreciated!
Solved! Go to Solution.
01-31-2023 03:28 PM
Hi @guido ,
So far the only option is using an action from a table that use i.url as the value to be set on your desired parameter.
Hopefully from Friday this week you should be able to do it on the parameter selector once I merge https://github.com/neo4j-labs/neodash/pull/274
02-06-2023 01:11 PM
Hi @guido !
We releases 2.2.2 last week. You should be able to get expected interaction with the new parameter selector.
12-07-2022 02:10 PM - edited 12-07-2022 02:11 PM
Hi @guido!
Are you using this query inside an iframe report? The iframe chart expects an url that may contain neodash parameters (its doesn't execute any query). You can inject this url as a parameter with an action or a parameter select chart (on our next release we will add the possibility to assign different values than the one displayed).
Bennu
12-08-2022 07:08 AM
Hi @bennu_neo ,
thanks for your reply.
Not sure what you mean, sorry.
Let me clarify a bit.
The url is the content of the property "url" of the node (i:Pictures).
I have a few hundred images, some are {type: "mark"}, others are {type:"portrait"}, etc. Some persons have 1 portrait, others have several, etc.
So I am looking for a way to display these whenever the parameter $neodash_name_name of the person in question is selected, much in the same way as their birthdate, profession and other data.
Could you post a code example that would do just that?
Thanks.
Guido
01-03-2023 04:36 PM
Hi @guido !
I've been out for a while. I hope I can still help. You should create an action that will eventually set a parameter e.g. $neodash_profile_picture to the value that's on the image url property. At the same time, you need an iframe chart with solely $neodash_profile_picture as input. Remember that the iframe chartS doesn't execute any cypher "iFrame reports let you embed external webpages into your dashboard. Enter an URL in the query box above to embed it as an iFrame."
regards
01-03-2023 05:32 PM - edited 01-03-2023 05:32 PM
Hi @bennu_neo ,
No problem. My turn to be offline for a while. I will respond at the end of the month. Guido.
01-29-2023 11:04 AM
Hi @bennu_neo ,
I finally got round to studying your reply and I do understand the mechanics now.
The only thing is that I can't figure out how to create the parameter.
The code:
MATCH (p:Producer)-[r:HAS_NAME_VARIANT]->(n:Name)
WHERE n.Name = $neodash_name_name
OPTIONAL MATCH (p)-[r2:HAS_PICTURES]->(i:Pictures {type: "mark"})
RETURN i.url
returns the url http://tapitta.be/wp-content/uploads/I2mark_1.jpg So far, so good.
The corresponding parameter would then be called $neodash_pictures_url. Now, how do I convert the property i.url into that parameter?
Thanks.
01-29-2023 03:31 PM
I am also looking for how to set parameters using another existing parameter, without requiring the user to manually interact... I'm not sure there is a way to accomplish this yet in neodash - but await an answer, as it would be very convenient to make tactical and contextual markdown/iFrame reports..
01-31-2023 03:31 PM
Hi @pdrangeid !
I remember this request. You told me that you were 'hacking' the parameter selector query by updating the dashboard json with your own query that uses other params. I remember updating the parameter selector in order to make this work. Isn't it working? Ill check.
Out of this hack, one of our top priority developments is adding a query builder that will allow you to set your own personalized queries on the selector.
01-31-2023 03:28 PM
Hi @guido ,
So far the only option is using an action from a table that use i.url as the value to be set on your desired parameter.
Hopefully from Friday this week you should be able to do it on the parameter selector once I merge https://github.com/neo4j-labs/neodash/pull/274
02-06-2023 01:11 PM
Hi @guido !
We releases 2.2.2 last week. You should be able to get expected interaction with the new parameter selector.
02-06-2023 11:06 PM
Hi @bennu_neo ,
I don't know if it's going to work because I don't see where the Parameter Selector comes in.
Let me clarify.
I have a large database of persons. the data of whom are returned on a series of tabs.
On the first tab, I look for the right person, which generates the parameter $neodash_name_name which is used to automatically return data on this particular person on the next tabs: Life Events (birth, etc.), Career Events (start, stop, etc.), Address, etc.
Then there is a table on which logos, portraits and examples of their work should be displayed.
This is where this query comes in:
MATCH (p:Producer)-[r:HAS_NAME_VARIANT]->(n:Name)
WHERE n.Name = $neodash_name_name
OPTIONAL MATCH (p)-[r2:HAS_PICTURES]->(i:Pictures {type: "mark"})
Lines 1 and 2 get the person in question and line 3 checks if there is a logo ("mark") present. If so, the url ( http://tapitta.be/wp-content/uploads/I2mark_1.jpg) is stored in the property i.url.
This property should be displayed in the iframe. So no human/manual intervention by means of a Parameter Selector.
Unless, of course, I misunderstood...
12-17-2022 05:42 AM
Anybody?🙏
All the sessions of the conference are now available online