how to populate the data in a form if the value of one field is existing.
It means, if i enter a particular id, then if it is existing in the db then it will populate the rest of the fields of that particular id.
Quick help !!
Discussion posts and replies are publicly visible
load( local!data: rule!queryEntity( id: ri!id ).data, a!sectionLayout( label: "Details", showWhen: if( isnull( local!data ), false(), true() ) ))
so based on id query entity will fetch the data,if that query entity result is not empty then show else hide by using show when condition
Hi Krishna Chaitanya
It is giving the below error.
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error in rule 'fetchingstudyid' at function 'queryruleexec': No value received for input [protocol] in query rule [fetchingSTUDYID]
load( local!id, local!data, { a!sectionLayout( label: "", contents: { a!integerField( label: "Id", value: local!id, saveInto: { local!id, a!save( local!data, rule!queryRule( fetchingstudyid: local!id ) ) } ) } ), a!sectionLayout( label: "Deatils", contents: {}, showWhen: if( isnull( local!data ), false(), true() ) ) } )
you are sending fetchingstudyid as null to query rule .
where you are giving id ,in that filed save into call your query rule .
In your case your results are most probably blank (""). Try to replace the isnull() function with Appian common objects expression rule "APN_isBlank" that holds the code: or(ri!singlePV="", isnull(ri!singlePV)). The rule input is of Any Type (ri!singlePV).