Issues with pulldata function in Survey 123

195
4
Jump to solution
05-01-2019 03:47 PM
Highlighted
New Contributor

I am having trouble implementing the pulldata function using Survey123. My survey is intended to collect information regarding moveable assets for municipalities using a barcode scanner. I have a CSV file that contains asset code and any other information pertaining to the assets. That CSV has been put into the media folder of my survey. I believe my calculation formula is correct. When I go into my survey, after typing or scanning the  barcode nothing is being populated for my other questions.

Tags (1)
Reply
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Frequent Contributor II

I am not sure since I keep seeing weird things with your csv file.

When I open in excel I get this with ;

FA0069920;FURNITURE AND FITTINGS;AIR CONDITIONER;AIR CONDITIONER - MIDEA;GOLDAIR;RM000501;M MKHABELA;MAIN BUILDING;FIRST FLOOR;RM000501;;EXCELLANT
FA0069290;FURNITURE AND FITTINGS;AIR CONDITIONER;HIGHBACK 1;Highback;RM000501;M MKHABELA;MAIN BUILDING;FIRST FLOOR;RM000501;;EXCELLANT

In Notepad same thing

BARCODE;SERIAL_NUMBER_PLATE;ASSET_DESCRIPTION;ROOMNUM;ROOM_DESCRIPTION;BUILDING;FLOOR;SITE_DESCRIPTION;RESPONSIBLE_PERSON;ASSET_CATEGORY_ID;CATEGORY;SUB_CATEGORY;SUB_CATEGORY_DESCRIPTION_FOR_DEPRECIATION;CONDITION 5727;N/A;4 DRAWERS - CABINET - STEEL 

If I import from txt in Excel I get this IF i use ; as the delimiter

ASSETCODE ASSETCATEGORY ASSETTYPE PRODUCTNAME ASSETNAME ROOMDESCRIPTION RESPONSIBLEPERSON BUILDINGNAME FLOOR ROOMNO SERIALNO CONDITION
FA0069920 FURNITURE AND FITTINGS AIR CONDITIONER AIR CONDITIONER - MIDEA GOLDAIR RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT
FA0069290 FURNITURE AND FITTINGS AIR CONDITIONER HIGHBACK 1 Highback RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT
FA0069281 FURNITURE AND FITTINGS CABINETS AND CUPBOARDS PEDESTAL PEDESTAL RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT
FA0069289 FURNITURE AND FITTINGS CABINETS AND CUPBOARDS PEDESTAL PEDESTAL RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT
FA0069291 FURNITURE AND FITTINGS CABINETS AND CUPBOARDS PEDESTAL PEDESTAL RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT

I am now not seeing a , but I way have used the wrong sheet.

In the end I think you somehow set it to use ; instead if , - then called it a csv - which is really is not.

I have attached a fixed version.  You could also use external_choices tab by a copy/paste instead.

View solution in original post

4 Replies
Highlighted
Occasional Contributor II

You have commas in your lists.   Found this example  S1B,S3N.  Cannot have any commas in the data.

Also your pulldata seems to reference columns that do not exist in the csv

pulldata('TBCASSETSMISSED','ASSETCATEGORY','ASSETCODE', ${ASSET_CODE})

ELEMENT ELEMENT_SUBNATIONAL_ID SNAME NAME_TYPE_CD SCOMNAME S_RANK EO_TRACK_STATUS_DESC

Also when I open you csv as a text doc it is all semicolans instead.

This sheet looks familiar did you post it before.

Reply
0 Kudos
Highlighted
New Contributor

Hi

I had a similar issue before however with a different data set. I am not able to find the commas that you referring to in the example you gave. Please if possible can you send me the spreadsheet with highlighted issues. I am not sure if they hidden or not from my side I tried searching but not finding. You assistance is greatly appreciated.

Reply
0 Kudos
Highlighted
Frequent Contributor II

I am not sure since I keep seeing weird things with your csv file.

When I open in excel I get this with ;

FA0069920;FURNITURE AND FITTINGS;AIR CONDITIONER;AIR CONDITIONER - MIDEA;GOLDAIR;RM000501;M MKHABELA;MAIN BUILDING;FIRST FLOOR;RM000501;;EXCELLANT
FA0069290;FURNITURE AND FITTINGS;AIR CONDITIONER;HIGHBACK 1;Highback;RM000501;M MKHABELA;MAIN BUILDING;FIRST FLOOR;RM000501;;EXCELLANT

In Notepad same thing

BARCODE;SERIAL_NUMBER_PLATE;ASSET_DESCRIPTION;ROOMNUM;ROOM_DESCRIPTION;BUILDING;FLOOR;SITE_DESCRIPTION;RESPONSIBLE_PERSON;ASSET_CATEGORY_ID;CATEGORY;SUB_CATEGORY;SUB_CATEGORY_DESCRIPTION_FOR_DEPRECIATION;CONDITION 5727;N/A;4 DRAWERS - CABINET - STEEL 

If I import from txt in Excel I get this IF i use ; as the delimiter

ASSETCODE ASSETCATEGORY ASSETTYPE PRODUCTNAME ASSETNAME ROOMDESCRIPTION RESPONSIBLEPERSON BUILDINGNAME FLOOR ROOMNO SERIALNO CONDITION
FA0069920 FURNITURE AND FITTINGS AIR CONDITIONER AIR CONDITIONER - MIDEA GOLDAIR RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT
FA0069290 FURNITURE AND FITTINGS AIR CONDITIONER HIGHBACK 1 Highback RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT
FA0069281 FURNITURE AND FITTINGS CABINETS AND CUPBOARDS PEDESTAL PEDESTAL RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT
FA0069289 FURNITURE AND FITTINGS CABINETS AND CUPBOARDS PEDESTAL PEDESTAL RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT
FA0069291 FURNITURE AND FITTINGS CABINETS AND CUPBOARDS PEDESTAL PEDESTAL RM000501 M MKHABELA MAIN BUILDING FIRST FLOOR RM000501 EXCELLANT

I am now not seeing a , but I way have used the wrong sheet.

In the end I think you somehow set it to use ; instead if , - then called it a csv - which is really is not.

I have attached a fixed version.  You could also use external_choices tab by a copy/paste instead.

View solution in original post

Highlighted
New Contributor

Hi

Thank you so much. I really appreciate your assistance. I also was able to fix after following some instructions form this link .CSV File Troubleshooting – SharpSpring 

Regards,

Jermina

Reply
0 Kudos