Hi,
In form , I am facing issue when the variable {SelectedUserExtraProperties.member_status}
is null or empty, the api is not hitting.
URL - /v1/api/app/master-category-datas/masterCategoryData?ParentName={SelectedUserExtraProperties.member_status}&CollectionName=MIF%20Member%20Status&GetParentValues=true&AccessByRole={LoginUserRole}&FilterText={Current_ms}
Here the value of {Current_ms}
is same as {SelectedUserExtraProperties.member_status}
Form JSON-
{
"title": "Status check",
"description": "Enter a form description",
"pages": [
{
"name": "page1",
"elements": [
{
"type": "expression",
"name": "current_ms",
"title": "Member status",
"expression": "{SelectedUserExtraProperties.member_status}"
},
{
"type": "radiogroup",
"name": "question1",
"title": "MIF Status",
"choicesByUrl": {
"url": "https://----/v1/api/app/master-category-datas/masterCategoryData?ParentName={SelectedUserExtraProperties.member_status}&CollectionName=MIF%20Member%20Status&GetParentValues=true&AccessByRole={LoginUserRole}&FilterText={Current_ms}",
"valueName": "name",
"titleName": "name"
}
}
]
}
]
}
Api not hitting when parameter value is blank or null
Answers approved by surveyjs Support
Hello Vani,
We request that all parameters should be non-empty. They are typically bind to question names and developers don't want to send request until values in these questions are not set.
Thank you,
Andrew
SurveyJS Team
Thanks for the response Andrew.
Is there any way to call the API even if the parameter is empty or null?
Hello,
Is it your parameter? You can change it from
"https://----/v1/api/app/master-category-datas/masterCategoryData?ParentName={SelectedUserExtraProperties.member_status}&CollectionName=MIF%20Member%20Status&GetParentValues=true&AccessByRole={LoginUserRole}&FilterText={Current_ms}" to
https://----/v1/api/app/master-category-datas/masterCategoryData?ParentName={SelectedUserExtraProperties.member_status}&CollectionName=MIF%20Member%20Status&GetParentValues=true&AccessByRole={LoginUserRole}{Current_ms_text}",
Where Current_ms_text = "&FilterText=" + Current_ms
Thank you,
Andrew
SurveyJS Team