error

what might be the reason for error?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi Kavya, looks like you have not configured target folder. Can you check whether you have configured fileuploadfiled properly or not?

  • i have configured it 

       a!fileUploadField(
              label: "File Upload",
              labelPosition: "ABOVE",
              target: tofolder(
                ri!folderId_int
              ),
              value: index(
                fv!item,
                "docId_int",
                ""
              ),
              saveInto: {
                fv!item.docId_int,
                if(
                  rule!APN_isBlank(
                    fv!item.docId_int
                  ),
                  {},
                  a!save(
                    fv!item,
                    updatedictionary(
                      dictionary: fv!item,
                      fieldsAndValues: {
                        updatedOn_dt: if(
                          not(
                            isnull(
                              fv!item.id_int
                            )
                          ),
                          now(),
                          {}
                        ),
                        folderId_int: ri!folderId_int,
                        folderRowId_int: ri!folderRowId_int,
                        updatedBy_txt: if(
                          not(
                            isnull(
                              fv!item.id_int
                            )
                          ),
                          loggedInUser(),
                          {}
                        ),
                        updatedByRole_txt: if(
                          not(
                            isnull(
                              fv!item.id_int
                            )
                          ),
                          rule!CR_FN_getUserRole(
                            inputUser_txt: loggedInUser()
                          ),
                          {}
                        )
                      }
                    )
                  )
                )
              },
              maxSelections: 1,
              validations: {
                a!localVariables(
                  local!invalidExtensions: difference(
                    upper(
                      fv!files.extension
                    ),
                    {
                      cons!CR_CUST_FILE_EXTENSION
                    }
                  ),
                  if(
                    length(
                      local!invalidExtensions
                    ) > 0,
                    cons!CR_CUST_VALIDATION_MESSAGE[1] & index(
                      fv!files,
                      "name",
                      wherecontains(
                        local!invalidExtensions,
                        upper(
                          fv!files.extension
                        )
                      ),
                      {}
                    ),
                    ""
                  )
                ),
                if(
                  or(
                    fv!files.size > cons!CR_CUST_MAX_UPLOAD_FILE_SIZE
                  ),
                  cons!CR_CUST_VALIDATION_MESSAGE[2] & index(
                    fv!files,
                    "name",
                    where(
                      fv!files.size > cons!CR_CUST_MAX_UPLOAD_FILE_SIZE
                    ),
                    {}
                  ),
                  ""
                )
              }
            ),
         

Reply
  • i have configured it 

       a!fileUploadField(
              label: "File Upload",
              labelPosition: "ABOVE",
              target: tofolder(
                ri!folderId_int
              ),
              value: index(
                fv!item,
                "docId_int",
                ""
              ),
              saveInto: {
                fv!item.docId_int,
                if(
                  rule!APN_isBlank(
                    fv!item.docId_int
                  ),
                  {},
                  a!save(
                    fv!item,
                    updatedictionary(
                      dictionary: fv!item,
                      fieldsAndValues: {
                        updatedOn_dt: if(
                          not(
                            isnull(
                              fv!item.id_int
                            )
                          ),
                          now(),
                          {}
                        ),
                        folderId_int: ri!folderId_int,
                        folderRowId_int: ri!folderRowId_int,
                        updatedBy_txt: if(
                          not(
                            isnull(
                              fv!item.id_int
                            )
                          ),
                          loggedInUser(),
                          {}
                        ),
                        updatedByRole_txt: if(
                          not(
                            isnull(
                              fv!item.id_int
                            )
                          ),
                          rule!CR_FN_getUserRole(
                            inputUser_txt: loggedInUser()
                          ),
                          {}
                        )
                      }
                    )
                  )
                )
              },
              maxSelections: 1,
              validations: {
                a!localVariables(
                  local!invalidExtensions: difference(
                    upper(
                      fv!files.extension
                    ),
                    {
                      cons!CR_CUST_FILE_EXTENSION
                    }
                  ),
                  if(
                    length(
                      local!invalidExtensions
                    ) > 0,
                    cons!CR_CUST_VALIDATION_MESSAGE[1] & index(
                      fv!files,
                      "name",
                      wherecontains(
                        local!invalidExtensions,
                        upper(
                          fv!files.extension
                        )
                      ),
                      {}
                    ),
                    ""
                  )
                ),
                if(
                  or(
                    fv!files.size > cons!CR_CUST_MAX_UPLOAD_FILE_SIZE
                  ),
                  cons!CR_CUST_VALIDATION_MESSAGE[2] & index(
                    fv!files,
                    "name",
                    where(
                      fv!files.size > cons!CR_CUST_MAX_UPLOAD_FILE_SIZE
                    ),
                    {}
                  ),
                  ""
                )
              }
            ),
         

Children