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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Apps
Unanswered

Data is not saving

(1) ShareShare
ReportReport
Posted on by 24
icon onsect used this code :Set(VarJanYTD,AutomaticResultsandYTDDisplayflow.Run(ThisItem.'Measure ID',ThisItem.Scope.Title,Text(ThisItem.'Created On', "yyyy-mm")).results);
//If(!IsBlank(VarJanResults),Set(varRes,Patch(varRes,{Jan:true})),Set(varRes,Patch(varRes,{Jan:false})))
If(
    CountRows(Filter(colRowMonthData, 'Objective ID' = ThisItem.'Objective ID')) = 0,
    // Add new record if it doesn't exist
    Collect(
        colRowMonthData,
        AddColumns(
            Gallery2_4.Selected,
            IsChanged,
            1,
            UnitType,
            If(
                IsNumeric(VarJanYTD) && Text(ThisItem.Unit) <> "text" ,
                1,
                Text(ThisItem.Unit) = "text",
                1,
                IsBlank(VarJanYTD),
                1,0
            )
        )
    ),
    // Use Patch to update the record if it exists
    Patch(
        colRowMonthData,
        LookUp(colRowMonthData, 'Objective ID' = ThisItem.'Objective ID'),
        AddColumns(
            Gallery2_4.Selected,
            IsChanged,
            1,
            UnitType,
            If(
                IsNumeric(VarJanYTD) && Text(ThisItem.Unit) <> "text" ,
                1,
                Text(ThisItem.Unit) = "text",
                1,
                IsBlank(VarJanYTD),
                1,0
            )
        )
    )
);save button onselect: Set(
    glbVarLoadingSpinner,
    true
);
ClearCollect(
    colMyTempObjective,
    Filter(
        Objectives,
        'Objectives (Views)'.'My Objectives'
    )
);
If(CountRows(Filter(colRowMonthData,UnitType = 0)) = 0 ,
ForAll(
    colRowMonthData As Alpha,
    Patch(
        Objectives,
        LookUp(
            Objectives,
            'Objective ID' = Alpha.'Objective ID'
        ),
        {
            'Result jan': If(
                Alpha.Unit <> Unit.text,
                Value(Alpha.ResultJan.Text),
                Blank()
            ),
            'Result jan t': If(
                Alpha.Unit = Unit.text,
                Alpha.ResultJan.Text,
                Blank()
            ),
            'YTD jan': If(
                Alpha.Unit <> Unit.text,
                Value(Alpha.YTDJan.Text),
                Blank()
            ),
            'YTD jan t': If(
                Alpha.Unit = Unit.text,
                Alpha.YTDJan.Text,
                Blank()
 
Data is displaying on textinput but it is not saving into dataverse.
Categories:
I have the same question (0)
  • Haque Profile Picture
    3,653 on at
     
    Are you confronting some errors? If so could you please post the errors here?

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard