I have gone through several times, however I'm unable to understand why this error is getting.
Discussion posts and replies are publicly visible
Seems you are trying to get an existing data from one table to another table. In the Database If your are passing an primary ID from parent table to Child table(foreign key) better go with record type and give relationship between two ID's then fetch the data accordingly.
Can you please elaborate it.?I'm new bee to Appian so, please...
The issue is, that you true to compare a list of integers to a single field in DB. This is what the error message tries to tell you.
[TypedValue[it=101,v={1}]]
The curly brackets indicate a list.
So, you can either use the "in" operator to compare, or make sure that this getVendorId expression returns only a single. The index() function might help you in doing that.
getVendorId rule return more than 1 integer value and while filtering out the data you are using "=" operator. Could you please try by using 'in' operator in your query filter. or use index function over the getVendorId function to get only 1 data.
worked for me !! thankyou
you just need to use the operator "in" as you are comparing the list of integer value and get output in single field.check attached images for the reference
Hi,
You are trying to fetch the IDs with the given value, which means your local!vendorID may return a list of values and also Here, you are retrieving the data through that by using `=`, This is used to match a single value. It checks if a field is equal to a specific value. whereas using `IN` compares the data against a list of values.This operator is used when you want to check if a field's value matches any value within a given list,so it will be useful when you want to filter by multiple values. So try by using like vendorId "in" local!vendorId
shukurs0001 ,
Try to use the below code from line 11 in place of queryfilter,
a!queryFilter( field: "vendorId", operator: "in", value: a!flatten({ local!vendorId }), applyWhen: a!isNullOrEmpty(local!vendorId) )
As your local!vendorId is getting the data in list of integer
Hi shukurs0001 ,It looks like local!vendorId is either returning a list of integers, which might not be what you're expecting, or it's returning a single integer wrapped in a list. Depending on your use case, you can resolve the issue as follows:1. If you want the filter to work with a list of integers, use the "in" operator:a!queryFilter( field: "vendorId", operator: "in", value: a!flatten({ local!vendorId }), applyWhen: a!isNotNullOrEmpty(local!vendorId))2. If you want the filter to work with a single integer, use the "=" operator, but ensure the value is treated as a single integer:a!queryFilter( field: "vendorId", operator: "=", value: cast(1, local!vendorId), applyWhen: a!isNotNullOrEmpty(local!vendorId))Also, since you're new to Appian, here's a quick tip: Instead of using an if condition, you can simplify things by using a!isNotNullOrEmpty.
local!vendorId
if
a!isNotNullOrEmpty