Hi There,
I’m trying to use card as buttons pattern to call an interface.
Interface is having gridfield used inside a!headerContentLayout() to display task lists.
However, I’m not sure how can I call call this interface using card as buttons pattern. Is that a right way of calling ?
Please do let me know if you need any more details.
Discussion posts and replies are publicly visible
Hi, As far as I understood you want to display different interfaces on clicking a card.
1. You can simply set a boolean when true you display a grid and when false you display a task list and vice versa.
2. You can use the choose function to navigate between multiple interfaces https://docs.appian.com/suite/help/22.3/navigation-patterns.html
Hi Ujjwal
Thanks for the response.
It’s only one interface containing task list.
I tried setting Boolean to true when clicking dynamic link and called interface in the contents section. It’s still not working.
Will you be able to help with any sample please ?
Yes, sure if you can share your code.
Check this
a!localVariables( local!showNewInterface, { a!cardChoiceField( label: "Card Choices", data: { a!map(id: 1, icon: "smile-o", primaryText: "Good", secondaryText: "I enjoyed my experience!", showTask:true()), a!map(id: 2, icon: "meh-o", primaryText: "Neutral", secondaryText: "My experience was okay.", showTask:false()), }, cardTemplate: a!cardTemplateTile( id: fv!data.id, primaryText: fv!data.primaryText, secondaryText: fv!data.secondaryText, icon: fv!data.icon ), value: local!showNewInterface, saveInto: a!save( local!showNewInterface, save!value ), maxSelections: 1, validations: {} ), choose( local!showNewInterface, a!cardLayout( contents: a!richTextDisplayField( label: "I am happy Card" ), ), a!cardLayout( contents: a!richTextDisplayField( label: "I am neutral Card" ) ) ) } )
I have uploaded my sample code here for reference.
Thanks much for the sample. In the above sample you are trying to display richtext upon selecting a card isn;t it?
Yes, It woked for you ?
And always try to use the code box whenever you share the code.