Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Building Power App_Request help to load data from choice columns. Incompatile Tables vs Text

(1) ShareShare
ReportReport
Posted on by 16

As you see in sharepoint list, i have columns say ' Tire Condition'. It is a choice column and values are Ok or Not Ok. I want to show count of Ok and count of not ok in a gallery.  I created a collection in 'On Start' to get Ok values but it keeps giving error. Answer should have been 3 for Ok count.

 

List 

deepaksharma_0_1-1721005521861.png

Code in On Start of App- showing collection has all inspection data from above sharepoint list

deepaksharma_0_2-1721005592611.png

 

Code in On Start of App which has Errors. I tried with and without .Value but error does not go away on signs

 

deepaksharma_0_0-1721005476199.png

deepaksharma_0_3-1721005749301.png

 

  • WarrenBelz Profile Picture
    WarrenBelz 145,567 on at
    Re: Building Power App_Request help to load data from choice columns. Incompatile Tables vs Text

    @deepaksharma_0 ,

    The issue will be with the multi-value fields - example using HourMeter

     HourMeter: CountIf(ColInspectionData, "Ok" in 'Hour Meter'.Value),
  • deepaksharma_0 Profile Picture
    deepaksharma_0 16 on at
    Re: Building Power App_Request help to load data from choice columns. Incompatile Tables vs Text

    Ok. Code is below. Choice column 'Tire Condition' accepts single value. But few fields accept multiple values

    ClearCollect(
        ColInspectionData,
        'DailyForklift/OrderPickerInspectionReport'
    );

    ClearCollect(
        ColOkCounts,
        {
            TireCondition: CountIf(ColInspectionData, TireCondition.Value = "Ok"),
            HeadLights: CountIf(ColInspectionData, HeadLights.Value =  "Ok"),
            WarmingLights: CountIf(ColInspectionData, 'Warming Lights'.Value = "Ok"),
            HourMeter: CountIf(ColInspectionData, 'Hour Meter'.Value = "Ok"),
            Horn: CountIf(ColInspectionData, Horn.Value = "Ok"),
            AnyLeaks: CountIf(ColInspectionData, 'Any Leaks'.Value = "Ok"),
            Steering: CountIf(ColInspectionData, Steering.Value = "Ok"),
            ServiceBrake: CountIf(ColInspectionData, 'Service Brake'.Value = "Ok"),
            ParkingBrake: CountIf(ColInspectionData, 'Parking Brake'.Value = "Ok"),
            MastCondition: CountIf(ColInspectionData, 'Mast Condition'.Value = "Ok")
           
        }
    );
  • WarrenBelz Profile Picture
    WarrenBelz 145,567 on at
    Re: Building Power App_Request help to load data from choice columns. Incompatile Tables vs Text

    Hi @deepaksharma_0 ,

    Can you please remember to post your code in Text as it saves re-typing here. The first error is because you have single quotes ' around ok instead of double quotes " on the first line. 

    WarrenBelz_0-1721011869541.png

    Apart from that, what type of fields are all those patched to for the Choice examples, are they single or multiple value ?? 

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,567

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,907

Leaderboard