Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!

The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.

Extract a value from a list

Hi, I am trying to learn Appian RPA (parse excel file) on macbook as a resource as per the procedure given by Appian at https://academy.appian.com/#/online-courses/57b938d8-8880-4d2c-bf8e-aa5c3e9cb1fd (page 12 of the tutorial)..

Background (what works)

While using a windows resource

and if we mention pv!fileProperties.path in the File Path menu - the BOT works as expected. 

Problem Statement (what I need help with)

Now since I am using a mac my fileProperties value is looking like

[{"name":".DS_Store","path":"/Users/jbanerjee/Desktop/Business Opportunities/.DS_Store","size":6.00390625,"createdAt":1659959223000,"lastModifiedAt":1659959223000,"extension":"DS_Store","type":"FILE"},{"name":"ParseExcelTutorial.xlsx","path":"/Users/jbanerjee/Desktop/Business Opportunities/ParseExcelTutorial.xlsx","size":4.9775390625,"createdAt":1659959185000,"lastModifiedAt":1659959185000,"extension":"xlsx","type":"FILE"}]
as you see for some reason 2 values are captured instead of 1. I have already shared my findings with Appian Technical Support team and they are looking into this as to why mac is generating 2 records even if only 1 excel file is present in the folder.
anyway for now a workaround is extract the value as highlighted in red above into a variable and use it in the File Path. Is there a way I can achieve this? please see there is a square bracket. 
let me know if any questions..I have already shared the link to the appian rpa tutorial that I am trying to build on my macbook. (please see that I have successfully build the same BOT on my windows machine, it is just that I am not able to do on macbook where I need help with) 
thanks
jaideep

  Discussion posts and replies are publicly visible

  • I am not sure if you are looking for this.

    a!localVariables(
    local!jsonString: substitute("[{""name"":"".DS_Store"",""path"":""/Users/jbanerjee/Desktop/Business Opportunities/.DS_Store"",""size"":6.00390625,""createdAt"":1659959223000,""lastModifiedAt"":1659959223000,""extension"":""DS_Store"",""type"":""FILE""},{""name"":""ParseExcelTutorial.xlsx"",""path"":""/Users/jbanerjee/Desktop/Business Opportunities/ParseExcelTutorial.xlsx"",""size"":4.9775390625,""createdAt"":1659959185000,""lastModifiedAt"":1659959185000,""extension"":""xlsx"",""type"":""FILE""}]","""",""""),
    index(a!fromJson(local!jsonString),"path",null)
    )

  • Wonderful Rahata.. yes this solves my problem. Thanks a lot. Your solution gives me a little more knowledge and insight on how to convert the Json string to a list of text. thanks much

    for others who are working with the RPA and facing this issue I found an easier solution this morning

    root cause (as figured out by Appian academy team):  According to some internet research, the .DS_Store file is a hidden file that Apple can create when we look at a folder with the Finder. It contains information about custom attributes and metadata as well as its containing folder and the names of other files around it. This is a Mac-only file, which is why we didn't have problems on Windows. 

    easy fix: the rpa for excel file parse has a name filter. All I need to do is use the wild card character and this filters OUT the DS_Store file (that starts with something other than Parse..)

    Now my fileProperties variable contains only 1 value that I can now work with. 

    thanks much

    jaideep

  • Welcome Jadeep & thanks for detailed information about the issue.