web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Articles or videos for...
Power Apps
Unanswered

Articles or videos for setting variables when customizing a SharePoint forms

(0) ShareShare
ReportReport
Posted on by 50

Hello,

 

I am customizing a SharePoint form using the "Integrate" --> "Power Apps" --> "Customize Forms" option and would like to know if anyone has any articles or videos to share on setting and using variables in calculations based on the selections on previous combo boxes.

 

I've tried out this scenario and tried having the variable value displayed in a later text box, but I haven't had much success.

 

thanks,

Sherazad.

Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    As salaam mu alikom @Sherazad - could you provide more detail on what it is you're trying to do?

  • Sherazad Profile Picture
    50 on at

    Hello Amik,

     

    So I am grabbing values from a different SharePoint list. These values are dependent on what is selected in 3 combo boxes. So I am trying to store what is returned in variables, which are then to be used in a calculation involving day and time.

     

    Please see attached. I was trying to fill in global variable varPriorty based on the selections from "Call Type" to "Banch". 

     

    varPriority is being populate in the onChange event of the service type column using the following formula. However the value is coming up blank.

     

     

    Set(varPriority,Distinct(
    Filter(
    'Call Type Equipment and Symptoms Lookup',
    'Category for capacity and counter' = DataCardValue26.Selected.Value && 'Symptom Description' = DataCardValue24.Selected.Value && 'Call Type' = DataCardValue18.Selected.Value && 'Equipment Group' = DataCardValue16.Selected.Value
    ),
    'Priority for capacity'
    ))

     

    Capture.PNG

     

     

    thanks,

    Sherzad.

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Sherazad you have forgotten the include the attachment if there was supposed to be one.

     

    I do not see anything wrong with your expression.

     

    Could you confirm what the field types are for: 

     

    • 'Category for capacity and counter'
    • 'Symptom Description'
    • 'Equipment Group'
    • 'Priority for capacity'

     

    I assume 'Call Type Equipment and Symptoms Lookup' is a SharePoint list?

  • Sherazad Profile Picture
    50 on at

    Hi Amik,

     

    Please see below:

     

    • 'Category for capacity and counter' - This is another SP list.
    • 'Symptom Description' - Single Line of Text
    • 'Equipment Group' - Column in "Call Type Equipment and Symptoms Lookup" list
    • 'Priority for capacity' - Column in Call Type Equipment and Symptoms Lookup and value I wish to store in the variable.

     

    And yes, "Call Type Equipment and Symptoms Lookup" is a SharePoint list I am getting the values from.

     

    thanks,

    Sherazad.

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    Hi @Sherazad ,

     

    If 'Category for capacity and counter' is another SharePoint list, then this line of code does not make any sense.

    'Category for capacity and counter' = DataCardValue26.Selected.Value

     

    I assume you meant to say that  'Category for capacity and counter' is a column from the 'Call Type Equipment and Symptoms Lookup' list?


    I know 'Equipment Group' and 'Priority for capacity' are columns in the 'Call Type Equipment and Symptoms Lookup' list, it is obvious from your code. What I asked is if you could confirm what the field types are (Single Line Text, Choice, Lookup etc)

  • Sherazad Profile Picture
    50 on at

    Hi Amik,

     

    You are correct, "Category for capacity and counter" is a column. All of the fields that are select lists were created as Single line of text to accommodate being filled from the list values.

     

    I got my varPriority variable to populate. I am now working on the varCapacity one.

     

    thanks,

    Sherazad.

  • Ami K Profile Picture
    15,679 Super User 2024 Season 1 on at

    @Sherazad - if your problem is resolved, I would recommend posting how you solved it to help other community users who may have a similar problem.

  • Sherazad Profile Picture
    50 on at

    Yes of course. So I was setting the varPriority in the "Select Service" combo which only had one value. I actually had to click the value and select it whichever way. I had just forgotten to  do so.

     

    I am still having an issue with setting varCapacity though. Below is the formula and PowerApps is complaining about it. The items in bold on the formula are hiligited in red in the formula bar, although I don't see anything wrong with it. Of course varCapacity is not being set.

     

    Set(varCapacity,Distinct(
    Filter(
    'Capacity Settings',
    'Branch' = DataCardValue19.SelectedText.Value && 'Priority' = varPriority
    ),
    'HVAC Service'
    ))

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard