Basic User cannot upload file into folder until adding him into administrator group

NOTE: PLEASE SEE MY LATEST UPDATES ON MY ISSUE ON THE COMMENT SECTION.

Hi every one, not sure if you have experienced this before:

The given requirement is to create an interface with a file upload field. With that file,check if the file format is csv, and if all the columns's header name are the right name and are in the right order). 

My code is attached below. The issue is that when the basic user's account is given viewer permission in my document folder, the file was not uploaded succesfully to the folder. If you have any recommendation please reach out. Thank you Slight smile

 

a!localVariables(
  local!document,
  local!uploadSuccess,
  local!correctFileFormat,
  a!fileUploadField(
    label: "File",
    target: cons!INCOMMing_DOCUMENTS,
    maxSelections: 1,
    value: local!document,
    saveInto: {
      a!save(local!uploadSuccess, false),
      local!document,
      if(
        a!isNullOrEmpty(local!document),
        {},
        a!submitUploadedFiles(
          onSuccess: {
            a!save(local!uploadSuccess, true),
            a!save(
              local!correctFileFormat,
              a!localVariables(
                local!validCSV: difference(
                  upper(document(ri!uploadFile, "extension")),
                  "CSV"
                ) < 0,
                if(
                  local!validCSV,
                  a!localVariables(
                    local!extractFile: previewcsvforimport(
                      document: ri!uploadFile,
                      delimiter: ",",
                      charset: "UTF-8",
                      numberOfRows: 6
                    ).data,
                    local!nullFile: a!isNullOrEmpty(local!extractFile),
                    local!previewFile: if(
                      local!nullFile = true,
                      null,
                      local!extractFile[1]
                    ),
                    and(
                      local!nullFile = false,
                      exact(
                        stripwith(upper(local!previewFile[1]), "/ (),."),
                        upper(
                          stripwith("File Name / Message ID", "/ (),.")
                        )
                      ),
                      exact(
                        stripwith(upper(local!previewFile[2]), "/ (),."),
                        upper(stripwith("Service", "/ (),."))
                      ),
                      exact(
                        stripwith(upper(local!previewFile[3]), "/ (),."),
                        upper(stripwith("Type", "/ (),."))
                      ),
                      exact(
                        stripwith(upper(local!previewFile[4]), "/ (),."),
                        upper(stripwith("Date Received", "/ (),."))
                      ),
                      exact(
                        stripwith(upper(local!previewFile[5]), "/ (),."),
                        upper(stripwith("Status", "/ (),."))
                      )
                    )
                  ),
                  false
                )
              )
            )
          },
          onError: a!save(local!uploadSuccess, false),
          documents: local!document
        )
      )
    },
    required: true(),
    validations: a!localVariables(
      local!invalidExtensions: difference(upper(fv!files.extension), "CSV"),
      if(
        length(local!invalidExtensions) > 0,
        "Attachments must be csv files. Please remove: " & index(fv!files, "name", {}),
        if(
          and(
            a!isNotNullOrEmpty(local!document),
            local!correctFileFormat = false
          ),
          "Please upload a file following required format",
          ""
        )
      )
    )
  )
)

  Discussion posts and replies are publicly visible

Parents Reply Children
  • 0
    Certified Senior Developer
    in reply to mollyn126
    because (please correct me if I'm wrong) you can not use a page as process start form. 

    We can, Action type page we can define a process which has start form.(But submituploadedfiles don't work in Start form).

    my interface is actually a page

    I assume the page type is just a Interface. Basic user does he part of document folder? .Can you tell us what's the error you are getting . Is it can't find document?? or is it error related to readingcsv file function??

     I don't have access to Appian Designer when being basic user

    That's because he isn't part of designer group. In Appian, Groups forms bridge between what a user sees and not.Basic user can see designer if he is part of designer group.

    You are basic user and still you are able to see and perform action in application because you are part of the Application Security groups.just like that  user needs at least editor access to upload a file to the document folder.  Object Security . 

    System Administrator bypasses all the securities. that's why he is able to perform the action.