when I run the functon a!fromJson(). It gives the error
Error:==
The JsonText parameter does must not be null or empty
what should i do
Discussion posts and replies are publicly visible
You cannot pass a NULL value to that function. Where is this coming from? If it is OK that there is a NULL value, then wrap the call into an if() and check for NULL using a!isNullOrEmpty(). If it is NOT OK, I suggest to use the error() function to make others aware of that situation.
local!search:if(a!isNullOrEmpty(ri!input),
{},
a!fromJson(ri!input)
),
local!pagingInfo:a!pagingInfo(
startIndex:local!search.startIndex,
batchSize:local!search.batchSize
)
when i apply a!nullorEmpty(ri!nput).in a!fromJson(ri!input)..It gives error at startIndex
error:-
invalid index:cannot index property startIndex of type String into type List of Variant
What are you trying to do here? What is this JSON data you are dealing with?
So, the dot-notation will fail in case that field does not exists. This is what the error message means.
You can use the index() or property() function to fetch values from fields. It allows you to provide a default value in case the field does not exist.