In this post we will learn about the use case of Blank Card State of a state element in flexcard,let us explain Blank state card .
Blank Card State :- Blank card state is use when we are getting record from any source and when the record is returing zero record then use it to show null/ zero record is coming. let us take an example to explain Blank state card .
Example :- In this example we use Flexcard’s State element and a State element’s blank state . A dataraptor as data source , and when we get data/record it will show and when we getting zero record Blank state card use to manage it , and also show a custom message on the screen .
Step :- 1 Create a flexcard and select dataraptor as datasource in setup .
Create a extract dataraptor as we know we are using dataraptor as a data source.
Map all the required fields as shown in the below image .
Step:-2 Move to setup section and search the dataraptor’s name in “Interface Name ” Box and choose it.
Add a new input map from the “input map” section, and fill it like —-
“Key” = “AccName”
“Value” = “Rec”
we are doing like this because we want to add the test parameter from the flexcard.
In the test parameter we provide input to search and it will search .
Click on save and fetch to get the record.
see below imageto map all point.
Step :-3 Drag all the fields from fields in the Build section to the canvas.
Drag a state element or clone the previous one, and check the blank card state button .
Map the same name of dataraptor and all that we filled before, to this state.
Here we take a text element to show some message.
Write the message in text property to show .
Step :-4 Preview the Flexcard to test the functionality.
we see the message that we write, to see the record click on the add test params button
fill the name of account to search the record, here we search “Acme” in the value field .
if we get the record it will show record like below image .
If we leave it without filling the parametere it will get the query like “Select id ,Name ,phone where name = ” ”.
with this it return null data.