Passing input parameter as ID when dashboard variable is Name

Hi Helical,

My report has “student_id” as a filter. On dashboard, I have an input parameter as “student_name”. When I select a particular “student_name”, corresponding “student_id” should be passed to the report.
Is there a way to do this?

Regards
Akshay

Hello Akshay,
Please follow the below steps:
Step 1: Create a EFWD file. In that file you have to write a query which is returning id and name whichever you want. Here, in my example I have taken Product_id and Product_name.

<DataMap id="2" connection="1" type="sql" >
		   <Name>Query for product name</Name>
			<Query>
				<![CDATA[
							select distinct plan_cards.product_id  as product_id,products.product_name as product_name from plan_cards inner join products on plan_cards.product_id=products.id inner join users on plan_cards.assign_to=users.id
						]]>
			</Query>
	</DataMap>

Save the above file in .efwd format.
Step 2: Add this file inside HI-repository folder.
For Example Location:: <path to “Helical Insight”\hi\hi-repository\1540796815586
Step 3: Create a report with the same ID here I will create a report with product_id.
Step 4: Now, open the dashboard and delete all the existing input parameters. Click on toggle shelf then select objects now select dashboard component and double click on select. It will appear just like shown in the image below.


Step 5: Once you open this then click on browse it will redirect to file browser then right click on the folder where ever you have added EFWD file and then click on select this folder as shown in the image below.

Step 6: Here I have selected “kissangates_testing” you have to select your folder.
Then type “Data Map Id” = 2 whichever map ID you have provided for that query. For selecting product_id and product_name I have given “Data Map Id” = 2. Then type product_name in display and product_id in value and save it.
screenshot3
Step 7: Then edit the input parameter and set dashboard variable with the id here I will be setting product_id.
screenshot4

Thank You
Helical Team