Forum Discussion

akash0800's avatar
akash0800
Helper I
3 years ago
Solved

Dynamic powerapp

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...
  • Sahir_Maharaj's avatar
    3 years ago

    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:

  • Sahir_Maharaj's avatar
    Sahir_Maharaj
    3 years ago

    1. Create a drop-down control to select the year in the form.

  • Sahir_Maharaj's avatar
    Sahir_Maharaj
    3 years ago

    2. Create a data card for each field you want to display in the form and set their visibility based on the selected year.

  • Sahir_Maharaj's avatar
    Sahir_Maharaj
    3 years ago

    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)

  • Sahir_Maharaj's avatar
    Sahir_Maharaj
    3 years ago

    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.

  • Sahir_Maharaj's avatar
    3 years ago

    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.