<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to display data Dropdown  from rule using database</title><link>https://community.appian.com/discussions/f/data/23355/how-to-display-data-dropdown-from-rule-using-database</link><description>Hi everyone i am new at Appian and i m trying to understand how i display the labels and the choice values that comes from a DB . into a dropdown and save it in a rule input after 
 its throwing an error that i dont understand. 
 can someone explain what</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: How to display data Dropdown  from rule using database</title><link>https://community.appian.com/thread/89734?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 14:13:46 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:06c9e5f9-259c-49da-9969-e861c652a444</guid><dc:creator>agam</dc:creator><description>&lt;p&gt;Since your Sector_Activity in nested within Customer Cdt, and your choice values are integer id&amp;#39;s, you should update you value and saveinto to append .id, like:&lt;/p&gt;
&lt;p&gt;ri!customer.Sector_Activity.id&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;assuming, id is the field in Sector_Activity where you wanna store your selection value&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to display data Dropdown  from rule using database</title><link>https://community.appian.com/thread/89733?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 14:10:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:ee0d5ced-8ee6-44bc-9c4c-2e5ec1994317</guid><dc:creator>yanivb0001</dc:creator><description>&lt;p&gt;&lt;span style="font-size:150%;"&gt;i solved the problem , now it is working&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;i had to do cast my result from the query entity (because it s returning a dictionary of CDT ) as you say , so i did a casting to a&amp;nbsp; list of my CDT.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;like in the picture , now i can display the content and save it in the rule input.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:150%;"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/Screenshot-_2800_9_29005F00_LI.jpg" /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/Screenshot-_2800_8_29005F00_LI.jpg" /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/Screenshot-_2800_8_2900_.png" /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to display data Dropdown  from rule using database</title><link>https://community.appian.com/thread/89731?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 13:58:18 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:06934e11-7800-475b-a057-9299da191d6c</guid><dc:creator>Peter Lewis</dc:creator><description>&lt;p&gt;This is a tricky issue to troubleshoot - I believe what&amp;#39;s happening is that there is a type mismatch between your choiceValues and your saved value. The choiceValues are of type dictionary (because that is what is returned by a!queryEntity()), but the value is of type Sector_Activity. For a dropdown field to work, the types and values must exactly match.&lt;/p&gt;
&lt;p&gt;It actually looks to met that you&amp;#39;re pretty close with yoru commented out code - if you run the cast you already have there against your query result, it should cast correctly and it should eliminate the type mismatch.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to display data Dropdown  from rule using database</title><link>https://community.appian.com/thread/89722?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 10:35:05 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:8ca74b19-8aa3-4c74-af0d-72c5b6fb2259</guid><dc:creator>yanivb0001</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/sasa.PNG" /&gt;&amp;nbsp; this is the customer CDT&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to display data Dropdown  from rule using database</title><link>https://community.appian.com/thread/89720?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 10:32:34 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:25d4acda-72bf-4ab6-9ba3-281fc9670ed7</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;Can you show me a screenshot of the customer CDT?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to display data Dropdown  from rule using database</title><link>https://community.appian.com/thread/89718?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 10:02:25 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:158e733c-682c-40a0-b08b-4b038dd6adb1</guid><dc:creator>yanivb0001</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/2727.Capture1.PNG" /&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/Capture2.PNG" /&gt;&amp;nbsp;&lt;span style="font-size:150%;"&gt;i forgot to specify that customer is CDT and sector activity is also a CDT and i want to save all the values in the Sector_activity . When i m doing what you said it is throwing an error about the casting . how we doing the cast ? and for what reason i need to cast it ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to display data Dropdown  from rule using database</title><link>https://community.appian.com/thread/89715?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 09:53:31 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:86616b73-5a00-474d-80d4-68b182cb733a</guid><dc:creator>Stefan Helzle</dc:creator><description>&lt;p&gt;The value AND data type of the parameters value and choicevalues must match. I assume that you want to store the ID of the selected sector and customer.Sector_Activity is an integer. Then&amp;nbsp;&lt;/p&gt;
&lt;p&gt;choiceValues: local!query_data_activity_sector.ID&lt;/p&gt;
&lt;p&gt;should work.&lt;/p&gt;
&lt;p&gt;BTW, your variable naming seems to not match the Appian best practices,&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.appian.com/suite/help/21.4/Standard_Object_Names.html"&gt;docs.appian.com/.../Standard_Object_Names.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to display data Dropdown  from rule using database</title><link>https://community.appian.com/thread/89714?ContentTypeID=1</link><pubDate>Thu, 13 Jan 2022 08:55:49 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:293de890-bba3-480f-99c3-7f30cbd3aef7</guid><dc:creator>yanivb0001</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/16/2548.Capture.PNG" /&gt;&amp;nbsp;and this is how i call the rule expressinon in my localvaraible&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>