EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

display picture in itemlist iff picture exists in recordset

Hi Everyone,

overall concept:
I am doing like a forum where users post up msgs (via Appery DB).
some msgs may include pic att'd, and some others no attachment.

page layout:
I use the itemlist and the label to display the text.
question : if I include in the itemlist the picture component, then when no att'd pic, the component will be empty which doesn't look good.

choices:
anybody asked you this kind of question before ?
any direction I shld look into ?

thk you very much in advance,
Best,
Eric

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

display picture in itemlist iff picture exists in recordset

Hi Eric,

You should use JS in service response mapping:
http://devcenter.appery.io/documentat...

And if you see an empty image URL in response, hide an Image component.

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

display picture in itemlist iff picture exists in recordset

Hi (again) Katya,
i'll check this out too.
thk you for your prompt reply (again).
:)

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

display picture in itemlist iff picture exists in recordset

Hi, I need a bit more help.
I found the way to read the data of {record ; field} for the field AttdImg.
I can hide the first record's img component since the Appery("imagecomponent") name matches.
but I do believe that not all "imagecomponent" don't carry that same name since there are many.
consequently, my condition doesn't apply to all "imagecomponent".
how can I hide all empty images within my ItemList ?
thk you in advance,
Eric

EJLD
Posts: 0
Joined: Sun Jun 08, 2014 11:03 pm

display picture in itemlist iff picture exists in recordset

Hi again, I found the way to make it work.
thk you very much.
Eric

Return to “Issues”