Unable to create Folder in SharePoint

Comments

15 comments

  • Avatar
    Karl Makatenas

    It may not be much help, but I've been using Claim Authentication with Office 365 instead of OAuth2 and it's been working fine.  Sometimes I set up my variable validation incorrectly and get similar errors, so I always default to a test case that works and mess with one thing at a time until I figure out what's wrong, so what I would do here is make sure the "context" variable is an OAuth2 problem and not something else that may be a silly mistake (which I make way too frequently).  Sorry if that's not much to go on.

    0
    Comment actions Permalink
  • Avatar
    SOURAV DAS

    @Karl, For me the Claims Authentication with Office 365 is working as well.But it requires setting up one user id and password for all workflow requests that use this access token. So, in my sharepoint , all folders created are created by that same user id instead of the person who approved the workflow.

    That's why i want to do OAuth2 which will take the current user credentials and create the folder in sharepoint. 

    0
    Comment actions Permalink
  • Avatar
    Karl Makatenas

    I can understand why your organization would need that; I simply add more columns to the list if I need them because I have some personal issues with the default stuff that SharePoint provides >.>.

    At this point I'm grasping at straws, so ignore me if it's not helpful.  Have you verified the user's permissions on SharePoint that they can make a new folder in the appropriate library through the native SharePoint back-end?  If so, I'm pretty much out of options other than letting someone else check your OAuth2 configuration in AgilePoint.

    0
    Comment actions Permalink
  • Avatar
    SOURAV DAS

    @Karl, Thanks for understanding the problem. I have checked the user permissions. My Access Token makes the OAuth connection successfully but somehow AgilePoint activity is not utilizing the Office365 Credentials while making the OAuth Request on runtime.

    Regarding adding columns to the list, how will that solve my problem?


    Thanks
    Sourav

    0
    Comment actions Permalink
  • Avatar
    Karl Makatenas

    Whenever we need to keep track of who created/modified an item and when, we usually make our own columns and hide the default SharePoint columns.  If you created new columns, then you could default to the Claims Authentication and populate, e.g., the "New Created By" field with the {UserName} System Variable or do something similar.  But I would also resort to submitting a ticket in case I run into a situation where I can't make new columns like that.

    0
    Comment actions Permalink
  • Avatar
    SOURAV DAS

    @Karl, I have opened a ticket. But, your approach could work for us. If you kindly can elaborate more on how to make that available.(Or are there any online documentation which i could refer to)
    So, when i am adding columns i get the following list under the Name of the Column.
    Which option should i select?( I think it should be person or group). After that how do you select the AgilePoint's fields inside SharePoint?

    The type of information in this column is:
     
    Single line of text
    Multiple lines of text
    Choice (menu to choose from)
    Number (1, 1.0, 100)
    Currency ($, ¥, €)
    Date and Time
    Lookup (information already on this site)
    Yes/No (check box)
    Person or Group
    Hyperlink or Picture
    Calculated (calculation based on other columns)
    External Data
    Managed Metadata
    0
    Comment actions Permalink
  • Avatar
    Karl Makatenas

    To populate the user, create a Person column in SharePoint, then use a System Data variable that has the user's email such as {UserEmail} to populate it.

    To get the {UserEmail} into the process, make a hidden form field that always changes to {UserEmail} on load, then use the form field directly or move it into a process variable if you want more flexibility.

    To show or hide columns in SharePoint, navigate to the list or library in question and hit "List Settings" or "Library Settings", then navigate to the Views section.  Either select an existing view or create a new view and set the view to be the Default View.  You can show/hide columns and change the order while configuring the view.

    This approach only works if the users who fill out these forms have access to the list/library in question using the same email in both AgilePoint and Sharepoint; if they're using their Office 365 login credentials for AgilePoint, then the problem is solved before it existed.

    Hopefully that's a good enough start to do what you need, but if you have more questions, don't hesitate to ask.

    0
    Comment actions Permalink
  • Avatar
    SOURAV DAS

    @Karl, thanks a lot for your help on this. Its been a week i have created a ticket but haven't received any response from AgilePoint Team.

    I followed your steps but got stuck at one point.
    So, on my list, i went into create new view settings.
    It has the following options:
    Name, Audience, Columns, Sort, Filter, Tabular View, Group By, Totals, Styles, Folders, Mobile View.

    Now, i get the following page(You have to zoom in as it is a big picture) , it shows me to arrange or add columns from a list on the right. Now, where to add the Column for Process Variable for e.g {{UserEmail}} sent from AgilePoint?
      

    0
    Comment actions Permalink
  • Avatar
    Karl Makatenas

    Ah, I didn't elaborate on that enough.

    Back up one screen to the general List/Library Settings menu.  One of the sections has a listing of all the columns available in the list or library and you can click on a column to modify it.  Just below that section should be a few options such as Create List Column or Import Column From Site Columns.  If your organization isn't that large and you don't have any SharePoint experts around, then go ahead and click Create List Column and set it as a Person Or Group type.  After creating the column, you should see it appear in the list of columns on the List/Library Settings screen.  Repeat this process for any other columns you need to create.

    If you do have a larger organization or you have a SharePoint expert around, there are much better practices to follow which will give you more forward-compatibility and better migration options for the future growth of this library, but that's not really within the scope of this forum so I think you may want to consult other resources on those matters.

    0
    Comment actions Permalink
  • Avatar
    SOURAV DAS

    @Karl, thanks for the reply.
    We are a relatively small organization and don't have much knowledge about SharePoint Integrations.
    So, i created a new column called AgilePoint_Testing and selected Person or Group type.( Attached the picture).
    Now, do i have to do anything on the Additional Settings below.
    So, how is this newly created column AgilePoint_Testing mapped to Process Variable {{UserEmail}}. 


    Additonal Settings



    0
    Comment actions Permalink
  • Avatar
    Karl Makatenas

    That's about all there is to the SharePoint aspect.  Now just edit the view and make sure this column will be visible (by checking the checkbox on the other screenshot you sent) and the SharePoint side should be good-to-go.

    On AgilePoint's end, make the hidden form field and populate it on load with {UserEmail}, then you can use AgilePoint's regular stencils/activities to create a document or folder and set the AgilePoint_Testing column to be the field that contains the user's email, wherever that field might be in your schema (maybe "pd:AP/pd:formFields/pd:UserEmailForSharePoint" or something similar).

    0
    Comment actions Permalink
  • Avatar
    Karl Makatenas

    I don't see the comment that's referenced in my inbox, but if you flip the New Folder stencil before the Update Metadata stencil, then adjust the Update Metadata stencil's configuration at the bottom to say

    Field (Optional):
    AgilePoint_Testing

    Field Value (Optional):
    <blank>

    then any folders which don't have data in the AgilePoint_Testing column will be updated to show the user's email.  Sometimes I run similar stuff, and leaving the Field Value blank actually updates every item in the list/library, so I have to create a process variable and update its content using the Update Process Data stencil and set it equal to a blank string (which is two double quotation marks in C#), then use that blank process variable in the Field Value.

    1
    Comment actions Permalink
  • Avatar
    SOURAV DAS

    @Karl,
    Still Not Working. I changed my process model to below(Keeping Update Meta Data at the right )


    Inside the Update Metadata activity, i am directly updating 1000021 folder(which i selected from the dropdown of folder) and it was created 4 hours ago.
    I kept AgilePoint_Testing in the Field Name and kept the field value as blank as shown in the picture.

    It is mandatory to add atleast one mapping. So, in the SharePoint Columns tab, i dragged the AgilePoint Testing to the right and mapped my form field which contains the email address.


    Now, i run it and the process completes successfully without any errors.
    But, on Sharepoint i don't see it changing. 


    Unable to figure out. I don't know where i am doing it wrong.

    0
    Comment actions Permalink
  • Avatar
    Karl Makatenas

    When you put a value into the Folder section of the configuration, AgilePoint will only modify items within the specified folder; not the folder itself.  Try removing the folder and I think we should see some magic happen.

    1
    Comment actions Permalink
  • Avatar
    SOURAV DAS

    @Karl, You are absolutely correct. This works. However it only works on files (Not on Folders itself). But, we can make this work. Thank You so much for taking the time to guide us through the solution to this issue.


    Thanks
    Sourav

    0
    Comment actions Permalink

Please sign in to leave a comment.