Skip to main content

Notifications

Power Apps - Power Apps Experimental Features
Unanswered

Patch Script to Sharepoint List

Like (1) ShareShare
ReportReport
Posted on 2 Oct 2024 16:07:06 by 8
 
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 29,371 on 03 Oct 2024 at 02:10:10
    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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #9 Get Recognized…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,316

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,290

Leaderboard

Featured topics

Loading complete