无法根据THITEM值有条件地设置默认图像
我正在使用SQL Server Image字段类型来存储记录的图像。我将图像属性设置为如此:
if(isblank(thisItem.VisorImage),'Full+Pink+Stroke+Stroke+Small+Small+裁剪(1)',thisitem.visorimage)
如果我只是将图像设置为“ Full+Pink+Stroke+Small+裁剪(1)'它可以正常工作,因此图像参考本身很好。但是我的记录都没有图像值,数据库只是显示null,我想显示默认值。如何检查空白/空图像以显示默认值?
这也没有给我我想要的。
cocece(ThisItem.VisitorImage,'Full+Pink+Stroke+STROKE+SMALL+裁剪(1)')
I'm using SQL Server IMAGE field type to store an image for a record. I set the Image attribute like so:
If(IsBlank(ThisItem.VisitorImage), 'full+pink+stroke+small+cropped (1)', ThisItem.VisitorImage)
If I set the image just to 'full+pink+stroke+small+cropped (1)' it works fine, so the image reference itself is fine. But none of my records have an IMAGE value yet, the database just shows null, and I want to display a default. How can I check for a blank/null IMAGE to display a default?
This also doesn't give me what I want.
Coalesce(ThisItem.VisitorImage, 'full+pink+stroke+small+cropped (1)')
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前,如果SQL Server映像为null,则无法在Power Apps中检查(我将使用产品团队创建一个错误来解决此问题)。您有几个选项:
Alter Table< tableName>添加hasvisitorimage为iif(visitorImage为null,0,1)
,并使用此新列选择是显示原始还是备份图像:if(thisItem.hasvisorimage,thisItem.visitorimage.visorimage,'full+ full+ full+粉红色+冲程+小+裁剪(1)')
Currently it is not possible to check, in Power Apps, if a SQL Server image is null (I'll create a bug with the product team to fix that). There are a couple of options you have:
ALTER TABLE <tableName> ADD HasVisitorImage AS IIF(VisitorImage IS NULL, 0, 1)
, and use this new column to choose whether to show the original or backup image:If(ThisItem.HasVisitorImage, ThisItem.VisitorImage, 'full+pink+stroke+small+cropped (1)')