Forum Discussion

kheatley's avatar
kheatley
Qrew Member
15 days ago

Can't see what is wrong with this formula using List

Have a formula that I can't find what error is. 

Error I'm getting is:

column: 81 > Expecting , 

Any help appreciated.

Here's my formula:

List(", ", If([Approval Status] = "Pending", [Related Administrator Name]) )

  • The faculty table organizes the Leave requests.   If you are replacing a paper based system then it does not immediately help you.  Once your Users have more than one request over time it is very helpful for reporting.

  • The problem is that List function needs at least 2 text fields to  concatenate together separated by the specific separator character which have set to be a comma and space.

    If you are not trying to list some things together than don't use the list function:

    If([Approval Status] = "Pending", [Related Administrator Name])

    Maybe you can say in plain English words what you were trying to have the formula due and we can help.  

  • Maybe I should be clearer in what I'm trying to do.

    We have an approval process with multiple persons needing to sign-off, so there could be multiple "Related Administrator Name(s)".

    Would the example you created above still work or would I need to use List?

  • Do really have multiple Related Administrators?  That would look like this:

    In this case my Projects table can have three Related Administrators from the three relationships.

    The field Related Admin XXX  is the reference field back to the Administrator table and is a number. That is not what you want to show the User.  The Look Up field with the Administrators Name should go into the formula.

     You would want a formula like this:

    If([Approval Status] = "Pending", List(",", [Admin One Name], [Admin Two Name], [Admin One Name]), "" )

    If your app looks completely different, please share how it is built.

     

    • kheatley's avatar
      kheatley
      Qrew Member

      Yes, sadly we do have multiple admins with a specific order for approval (1 DIVISION HEAD (there are 4 total but only one is needed per request based on DIVISION), 1 COURSE MANAGER, 1 ACADEMIC OFFICER, 1 ASSOCIATE HEAD, AND 1 DEPARTMENT HEAD - in this approval order). Attached is screenshot of my tables/relationships.  Yours looks like it might be easier. 

      Below is the whole process I need to capture if it helps.

      I need to build a faculty leaves app, where faculty can enter leave information on a form (first name, last name, school_id, email, division, leave type, semester of leave, year of leave, year of previous leave, leave start date, leave end date, leave plans, funding sources, and status (pending approval, rejected, or approved). Multiple administrators (1 DIVISION HEAD (there are 4 total but only one is needed per request based on DIVISION), 1 COURSE MANAGER, 1 ACADEMIC OFFICER, 1 ASSOCIATE HEAD, AND 1 DEPARTMENT HEAD - in this approval order) will need to grant their approval to each leave request before the status changes to "approved". When a submission is made via the leaves form (leaves form record created), it will then create a notification email that will go out to all administrators (the DIVISION HEAD depending on which DIVISION was entered into form, 1 COURSE MANAGER, 1 ACADEMIC OFFICER, 1 ASSOCIATE HEAD, AND 1 DEPARTMENT HEAD) stating there is a submission that is pending approval. Also create an email sent to administrators listing which requests they still need to approve. 

      • DonLarson's avatar
        DonLarson
        Qrew Elite

        This could get real complicated if you wanted to build tables for the Divisions, Courses and so on. 

        However trying to keep this simple now, this is what I would build:

         

         

        All the data about the Leave Request goes in the Leave Request Table.

        Each Administrator adds an Approval record.   Actually, make it a Decision Record because they could say no.