Not able to get document into Appian Folder

Certified Senior Developer

Hey All,

I am not getting the document upload in the portal into Appian Environment. i used a!submitUploadedFiles() as well

a!buttonWidget(
label: "Submit",
submit:true(),
saveInto: {
/*a!verifyRecaptcha(),*/
rule!PA_InsertDataIntoDB(
userInfo: local!userInfo,
onSuccess: {
a!submitUploadedFiles()
}
)
}
)

  Discussion posts and replies are publicly visible

Parents
  • Can you share what the rule PA_InsertDataIntoDB is doing? Assuming it uses a!writeToDataStoreEntity(), does the write to the database work successfully? What troubleshooting steps have you tried? Are you receiving any error messages?

  • 0
    Certified Senior Developer
    in reply to Peter Lewis

    Data is written into DB successfully. Basically,PA_InsertDataIntoDB is calling the web service to write the data into DB.

  • If you run something else in the `onSuccess` property, does that execute successfully?

  • Can you share what the expression for your a!fileUploadField looks like? Make sure your service account that you configured when publishing the portal has editor access to the folder you are uploading to.

    docs.appian.com/.../portals-documents.html

  • 0
    Certified Senior Developer
    in reply to alex.ladue

    a!localVariables(local!file,
    local!userInfo: 'type!{urn:com:appian:types:PA}PA_UserInformation'(),
    a!formLayout(
    label: "User Information",
    contents: {
    a!columnsLayout(
    columns: {
    a!columnLayout(
    contents: {
    a!textField(
    label: "User Name",
    value: local!userInfo.userName,
    saveInto: local!userInfo.userName
    ),
    a!textField(
    label: "Full Name",
    value: local!userInfo.fullName,
    saveInto: local!userInfo.fullName
    ),
    a!textField(
    label: "Manager/Supervisor Name",
    value: local!userInfo.managerName,
    saveInto: local!userInfo.managerName
    )
    }
    ),
    a!columnLayout(
    contents: {
    a!textField(
    label: "Designation",
    value: local!userInfo.designation,
    saveInto: local!userInfo.designation
    ),
    a!textField(
    label: "Department",
    value: local!userInfo.department,
    saveInto: local!userInfo.department
    ),
    a!textField(
    label: "PAN/SSN",
    value: local!userInfo.PAN_SSN,
    saveInto: local!userInfo.PAN_SSN
    )
    }
    ),
    a!columnLayout(
    contents: {
    a!radioButtonField(
    label: "Gender",
    choiceValues: { "Male", "Female" },
    choiceLabels: { "Male", "Female" },
    value: local!userInfo.gender,
    saveInto: local!userInfo.gender
    ),
    a!fileUploadField(
    label: "Resume/CV",
    value:local!file,
    saveInto: {local!file,local!userInfo.resume_CV},
    maxSelections: 1,
    target: tofolder(4704)
    )
    }
    )
    }
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: a!buttonWidget(
    label: "Submit",
    submit:true(),
    saveInto: {
    /*a!verifyRecaptcha(),*/
    rule!PA_InsertDataIntoDB(
    userInfo: local!userInfo,
    onSuccess: {
    a!submitUploadedFiles()
    }
    )
    }
    )
    )
    )
    )

    This is the whole code. 

    Yes, that service account has editor access to the folder

Reply
  • 0
    Certified Senior Developer
    in reply to alex.ladue

    a!localVariables(local!file,
    local!userInfo: 'type!{urn:com:appian:types:PA}PA_UserInformation'(),
    a!formLayout(
    label: "User Information",
    contents: {
    a!columnsLayout(
    columns: {
    a!columnLayout(
    contents: {
    a!textField(
    label: "User Name",
    value: local!userInfo.userName,
    saveInto: local!userInfo.userName
    ),
    a!textField(
    label: "Full Name",
    value: local!userInfo.fullName,
    saveInto: local!userInfo.fullName
    ),
    a!textField(
    label: "Manager/Supervisor Name",
    value: local!userInfo.managerName,
    saveInto: local!userInfo.managerName
    )
    }
    ),
    a!columnLayout(
    contents: {
    a!textField(
    label: "Designation",
    value: local!userInfo.designation,
    saveInto: local!userInfo.designation
    ),
    a!textField(
    label: "Department",
    value: local!userInfo.department,
    saveInto: local!userInfo.department
    ),
    a!textField(
    label: "PAN/SSN",
    value: local!userInfo.PAN_SSN,
    saveInto: local!userInfo.PAN_SSN
    )
    }
    ),
    a!columnLayout(
    contents: {
    a!radioButtonField(
    label: "Gender",
    choiceValues: { "Male", "Female" },
    choiceLabels: { "Male", "Female" },
    value: local!userInfo.gender,
    saveInto: local!userInfo.gender
    ),
    a!fileUploadField(
    label: "Resume/CV",
    value:local!file,
    saveInto: {local!file,local!userInfo.resume_CV},
    maxSelections: 1,
    target: tofolder(4704)
    )
    }
    )
    }
    )
    },
    buttons: a!buttonLayout(
    primaryButtons: a!buttonWidget(
    label: "Submit",
    submit:true(),
    saveInto: {
    /*a!verifyRecaptcha(),*/
    rule!PA_InsertDataIntoDB(
    userInfo: local!userInfo,
    onSuccess: {
    a!submitUploadedFiles()
    }
    )
    }
    )
    )
    )
    )

    This is the whole code. 

    Yes, that service account has editor access to the folder

Children