Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am new to powerapps and want to explore the possibility of building a powerapp form that can act in a dynamic way.
For example:
My data is coming from SharePoint list
Emp id, Emp Name - single line text columns Design, Deployment - drop-down list
Now I want to build a review form on top of this data for each year and store it back to my SharePoint list.
Query: While creating the form from my existing data the data cards are automatically picked evaluated and the data is written back with no other issues.
But when I have to capture data for next year, I again need to perform some basic configuration to include the new field values.
I need your help to know the way out from this situation.
Note: I also tried to build a form from scratch and try bind the data, but it failed when trying to add data for next year.
In this form I had an additional label that captures the year and other field names keep changing based on the value.
Thanks,
Akash
Solved! Go to Solution.
Hello @akash0800,
You can dynamically change the fields in the form based on the selected year by using the PowerApps formula language. Here are the steps to accomplish this:
1. Create a drop-down control to select the year in the form.
2. Create a data card for each field you want to display in the form and set their visibility based on the selected year.
5. Use the context variable in the "Default" property of the data cards to display the appropriate data for the selected year. For example: LookUp(SharePointList, EmpID = Form1.LastSubmit.EmpID, SelectedYear)
By using these steps, you can dynamically change the fields in the form based on the selected year, without having to create a separate form for each year.
You can also store the data for each year in a separate row in the SharePoint list, using the "EmpID" and "Year" columns as a composite key.
Dankie - Helps me too!!!
You can also store the data for each year in a separate row in the SharePoint list, using the "EmpID" and "Year" columns as a composite key.
Hello @akash0800,
You can dynamically change the fields in the form based on the selected year by using the PowerApps formula language. Here are the steps to accomplish this:
By using these steps, you can dynamically change the fields in the form based on the selected year, without having to create a separate form for each year.
5. Use the context variable in the "Default" property of the data cards to display the appropriate data for the selected year. For example: LookUp(SharePointList, EmpID = Form1.LastSubmit.EmpID, SelectedYear)
4. Use the "UpdateContext" function to set a context variable based on the selected year. For example: UpdateContext({SelectedYear: Dropdown1.Selected.Value})
3. Use the "Visible" property of the data cards to determine if they should be shown based on the selected year. For example: If(Dropdown1.Selected.Value = "2021", true, false)
2. Create a data card for each field you want to display in the form and set their visibility based on the selected year.
1. Create a drop-down control to select the year in the form.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.