Hi @Anonymous :
Firstly,let me explain why you encounted this problem:
The key is that the data type of value is inconsistent.
value: {id: [1], display: ["Pubmed"]}
This means that the type of 'value' is object
value: [{ display: "and" }]
This means that the type of 'value' is array
Secondly,you can try:
JSON([
{
colorType: 6,
display: "Source Type",
id: "SourceType",
operator: { display: "=", id: "COptionalEqual", valueType: 3 },
value: { id: [1], display: ["Pubmed"] }
},
{ display: "and", value: {display: ["and"] } },
{
colorType: 1,
display: "All Fields",
id: "AllFields",
operator: { display: "Contain", id: "AllFieldsContain", valueType: 1 },
value: {display:[ "cancer"] }
}
])
In addition,Json is a Behavioral formula.I suggest you use a buttion, store its value in a variable, and then call the variable directly.For example:
Add a button and set it's OnSelect property to
Set(myvar,JSON([
{
colorType: 6,
display: "Source Type",
id: "SourceType",
operator: { display: "=", id: "COptionalEqual", valueType: 3 },
value: { id: [1], display: ["Pubmed"] }
},
{ display: "and", value: {display: ["and"] } },
{
colorType: 1,
display: "All Fields",
id: "AllFields",
operator: { display: "Contain", id: "AllFieldsContain", valueType: 1 },
value: {display:[ "cancer"] }
}
]))
Best Regards,
Bof