Skip to main content

Notifications

Power Apps Experimental Features
Unanswered

Patch Script to Sharepoint List

Posted on by 4
 
The below script will just not work:
Patch(
    'SIP PERFORMA LIST',
    Defaults('SIP PERFORMA LIST'),
    {
        StudentName: Text(StudentName.Selected.displayname),
        ApplicationDate: DateValue(TextInputApplicationDate.Text),
        SIPSubject: TextInputSIPSubject.Text,
        TeacherName: TextInputTeacherName.Text,
        currentGrade: TextInputCurrentGrade.Text,
        EOYTarget: TextInputEOYTarget.Text,
        ReasonForSIP: TextInputReasonForSIP.Text,
        LinkToExamBoardSpec: TextInputLinkToExamBoardSpec.Text,
        AreaOfContentToReview: TextInputAreaOfContentToReview.Text,
        ExamSkillsSpecificTargets: TextInputExamSkillsSpecificTargets.Text,
        Link2examboardAssessment: TextInputLink2examboardAssessment.Text,
        StrategiesActions: TextInputStrategiesActions.Text,
        WhoWillMentorSupervise: TextInputWhoWillMentorSupervise.Text,
        WhoWillBeInvolved: TextInputWhoWillBeInvolved.Text,
        Weekly_Meetings: If(CheckboxWeeklyMeetings.Value, "True", "False"),
        BiWeekly_Meetings: If(CheckboxBiWeeklyMeetings.Value, "True", "False"),
        HalfTermly_Meeting: If(CheckboxHalfTermlyMeeting.Value, "True", "False"),
        MonthlyMeeting: If(CheckboxMonthlyMeeting.Value, "True", "False"),
        Timescales: TextInputTimescales.Text,
        SuccessCriteria: TextInputSuccessCriteria.Text,
        Attainment: TextInputAttainment.Text,
        NextMeetingDate: DateValue(TextInputNextMeetingDate.Text),
        ActionTaken_PhoneCall: If(ActionTaken_PhoneCall.Value, "True", "False"),
        ActionTaken_Download: If(ActionTaken_Download.Value, "True", "False"),
        ActionTaken_LetterToGoHome: If(ActionTaken_LetterToGoHome.Value, "True", "False"),
        ActionTaken_GSHasOverview: If(ActionTaken_GSHasOverview.Value, "True", "False")
    }
);
SubmitForm(SIP_PROFORMA);
 
What am i doing wrong?
 
Especially these lines:
 
ActionTaken_PhoneCall: If(ActionTaken_PhoneCall.Value, "True", "False"),
ActionTaken_Download: If(ActionTaken_Download.Value, "True", "False"),
ActionTaken_LetterToGoHome: If(ActionTaken_LetterToGoHome.Value, "True", "False"),
ActionTaken_GSHasOverview: If(ActionTaken_GSHasOverview.Value, "True", "False")
 
My columns in sharepoint are set to single line text - but the erros say :
rror - the type of this argument 'ActionTaken_Download.' does not match the expected type 'Text@
  • FLMike Profile Picture
    FLMike 26,301 on at
    Patch Script to Sharepoint List
    HI
     
    for these
     
    ActionTaken_PhoneCall: If(ActionTaken_PhoneCall.Value, "True", "False"),
    ActionTaken_Download: If(ActionTaken_Download.Value, "True", "False"),
    ActionTaken_LetterToGoHome: If(ActionTaken_LetterToGoHome.Value, "True", "False"),
    ActionTaken_GSHasOverview: If(ActionTaken_GSHasOverview.Value, "True", "False")
     
    Is ActionTaken_PhoneCall.Value a boolean? if not then that is the issue.
     
    Also it looks like some of the message is missing, can you make sure the entire message (error) is there.
     
    Also, if those things are null or blank then Value won't be a boolean which will also be a problem.

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

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Welcome to the new Power Platform Community!…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 141,122

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,414

Leaderboard

Featured topics