SLICE ROWFILTER DOES NOT WORK WITH IMAGES

Ia have this issue,  in the slice row filter i have this expression:

[alfoto]="Iconos/fimg.png"

slice does not show any record

note: alfoto column is image type

any help oin this would be appreciated

0 18 289
18 REPLIES 18

I believe your expression should work as written. 

Have you checked the datasource to make sure the values in the column match the filename text exactly?

Could you show examples of that column from your datasource?  Maybe we'll see something you don't.

hI Experts,  Any Help on this? I have the same issue,  slice filter does not work with images names

Please show some screenshots with example of where it is not working.  I don't see any issue with the expression you have supplied in the original post.  We need more details to be able to help.

EDITED:  Please see image below showing a view will ALL images and then a view on a slice that is filtered using this expression:

Screenshot 2023-07-16 at 8.40.12 PM.png

Dashboard comparing 2 views side by side

Screenshot 2023-07-16 at 8.38.40 PM.png

Hello @WillowMobileSys ,  thanks for answer  here is thje slice screenshot,  the image path is the right one and the image name too

oscarjsan_0-1689635062261.png

Here is the view,   nothing to show

oscarjsan_1-1689635297517.png

what i was missing

Here you can find a screenshot of the table, and Column

oscarjsan_0-1689636528924.png

 

here the column properties:

oscarjsan_1-1689636695267.png

 

I see no issue with the Slice condition and the data.

Can you please provide a screenshot of the View definition?  That would be the last piece of the puzzle I think.

The sheet path is a bit unusual.  By default, there is usually a path include with the file name - like what you showed in your initial post.   I am not certain what AppSheet does when it is just the filename inserted.  I assume it will just look in the root folder?

NOTE:  AppSheet uses the folder where the sheet is located as the root.  The way you have your sheet data assigned, at the very least the images MUST be in the same folder as the sheet for that table.


@WillowMobileSys wrote:

The sheet path is a bit unusual.  By default, there is usually a path include with the file name - like what you showed in your initial post.   I am not certain what AppSheet does when it is just the filename inserted.  I assume it will just look in the root folder?


Oops!  I missed the slash in your sheet column data.  I understand now.  Still what you have defined in the Slice condition and sheet column looks fine.  

Please show a screenshot of the view definition.  Maybe something is not set right there?

Oh, and you might check the image security settings.  Some are realizing they need to turn on Image signing.  Honestly, I am not sure when it is needed.

Screenshot 2023-07-17 at 8.55.19 PM.png

 

oscarjsan_1-1689641791676.png

the view definition

Ok, I  created a test exactly like yours and I experienced the same issue.  I believe what is happening is that Image column is not being compared as its TEXT path+filename.  I.e. an Image column cannot be compared to a text string.

I was able to workaround  this by assigning the Image column to a second TEXT column.  In this case it appears AppSheet will extract the path+filename as text into the second column. Then in the slice I used the second column to filter.  See the images below.

Screenshot 2023-07-18 at 8.09.26 AM.png

Could you just use TEXT([Image]) in the slice expression, instead of adding the new column?

@WillowMobileSys I really appreciate your help and follow up with this,  i did the woraround option ,  create a VC(TEXT TYPE) and works I expected,  

 

as @Marc_Dillon said I was hoping convert the type image to text,,  but as you said "TEXT() doesn't support Image type columns"

I thnk this workaround is not best option,  i try avoid use more VC,  but i dont have in this table lot of records to compute,  so this is the only and best option,

Appreciate your time and support on this

@oscarjsan You don't have to avoid using VCs, they are a powerful and essential AppSheet tool. You just have to avoid performing table lookups (SELECT, etc.) in VCs, that's all. 

The solution @WillowMobileSys has provided is a perfect use case for a VC.

I agree with @Joseph_Seddik .  In this case because the VC is referencing info on the same row, the vc is super-fast.  I believe AppSheet also uses optimization to know when these VC's do not need to re-calc.

Having said that, there is still the CHECK to see if a VC needs to re-calc or not.  So there is still a very slight performance hit on Sync but not enough to warrant avoiding the usage of the VC.

The absolute BEST way to implement this work around is to use an extra "normal" column using an App Formula.  The recalc then is only ever done if the Image changes - at the time it is changed.  From then on, it is just a data read.  No VC impact at all.


@Marc_Dillon wrote:

Could you just use TEXT([Image]) in the slice expression, instead of adding the new column?


I tried that first but it didn't work.  Most likely because TEXT() doesn't support Image type columns - yet!

 

<a h src Image ="name.gif" >name</a> HtML code 

filename/image/photo.gif

Need to Edit the right format for it as same people cann't read png,etc...


@Joseph_Seddik wrote:

@oscarjsan You don't have to avoid using VCs, they are a powerful and essential AppSheet tool. You just have to avoid performing table lookups (SELECT, etc.) in VCs, that's all. 


Well said @Joseph_Seddik . I think VCs have their own pride of place in the app creation if used judiciously. 

Top Labels in this Space