英文:
The variables are not recognized
问题
Set(VarAttachmentControl,JSON(Image1.Image,IncludeBinaryData));
Set(VarBase64,Mid(VarAttachmentControl, Find("","", VarAttachmentControl)+1, Len(VarAttachmentControl)-Find("","", VarAttachmentControl)-1));
在Power Apps中遇到了一个问题。变量未被识别。然而,当我在第一行使用";"而不是","时,一切正常。
但然后我无法使用第二个"Set"。它不会被识别。有办法解决这个问题吗?
Set(VarAttachmentControl;JSON(Image1.Image;IncludeBinaryData))
但然后我无法使用第二个"Set"。它不会被识别。有办法解决这个问题吗?
英文:
Set(VarAttachmentControl,JSON(Image1.Image,IncludeBinaryData));
Set(VarBase64,Mid(VarAttachmentControl, Find(",", VarAttachmentControl)+1, Len(VarAttachmentControl)-Find(",", VarAttachmentControl)-1));
I run into a problem in power apps. The variables are not recognized. However, when I use a ";" instead of "," in the first line, that goes well.
But then I can't use the second 'Set". It will not be recognized. Is there a weay to fix this?
Set(VarAttachmentControl;JSON(Image1.Image;IncludeBinaryData))
But then I can't use the second 'Set". It will not be recognized. Is there a weay to fix this?
答案1
得分: 1
从https://learn.microsoft.com/power-apps/maker/canvas-apps/global-apps#formula-separators-and-chaining-operator,如果您的区域设置中小数点分隔符是“,”,那么“列表分隔符”(用于分隔函数参数的令牌)变为“;”,而“链接运算符”(用于在同一表达式中分隔两个函数调用的内容)变为“;;”。由于您说在您的情况下使用“;”作为列表分隔符有效,因此您的表达式应写成如下形式:
Set(
VarAttachmentControl;
JSON(Image1.Image; JSONFormat.IncludeBinaryData));;
Set(
VarBase64;
Mid(
VarAttachmentControl;
Find(";", VarAttachmentControl) + 1;
Len(VarAttachmentControl) - Find(";", VarAttachmentControl) - 1
)
);;
英文:
From https://learn.microsoft.com/power-apps/maker/canvas-apps/global-apps#formula-separators-and-chaining-operator, if the decimal separator in your locale is ,
, then the "list separator" (the token used to separate parameters to a function) becomes ;
, and the "chaining operator" (what is used to separate two function calls in the same expression becomes ;;
. Since you say that using ;
as a list separator works in your scenario, your expression should be written as follows:
Set(
VarAttachmentControl;
JSON(Image1.Image; JSONFormat.IncludeBinaryData));;
Set(
VarBase64;
Mid(
VarAttachmentControl;
Find(","; VarAttachmentControl) + 1;
Len(VarAttachmentControl) - Find(","; VarAttachmentControl) - 1
)
);;
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论