Dataview Error

First off, I’m very inexperienced with Dataview.

I’m trying to create a table with columns representing the different file properties.

Here’s my code:

```dataview
TABLE FROM "RVs"
address AS "Address"
phone AS "Phone #"
email AS "Email"
last-visit AS "Last Visit"
best-time-to-call AS "Best Time To Call"
SORT file ASC
```

Here’s the error message I’m getting:

Dataview: Error:
– PARSING FAILED ------------------------- -------------------------

1 | TABLE FROM “RVs”
> 2 | address AS “Address”
| ^
3 | phone AS “Phone #”
4 | email AS “Email”

Expected one of the following:

‘and’ or ‘or’, /FROM/i, EOF, FLATTEN [AS ], GROUP BY [AS ], LIMIT , Not a comment, SORT field [ASC/DESC], WHERE , whitespace

Can someone tell me what I’m doing wrong & point me in the right direction? Thank you.

Try switching the FROM location…

 ```dataview
TABLE 
  address AS "Address"
  phone AS "Phone #"
  email AS "Email"
  last-visit AS "Last Visit"
  best-time-to-call AS "Best Time To Call"
FROM "RVs"
SORT file ASC
```

That’s actually how I had it initially, but it was still giving me an error message. So, I tried switching it to the way I have It now & it didn’t make a difference.

Add commas between your column headers. And as FsOver2 said, the FROM statement can’t be between TABLE and the column headers.

Try this:

```dataview
TABLE
	address AS "Address",
	phone AS "Phone #",
	email AS "Email",
	last-visit AS "Last Visit",
	best-time-to-call AS "Best Time To Call"
FROM "RVs"
SORT file ASC
```
2 Likes

By the way, for future troubleshooting, the error message shows where Dataview encounted the first error and what it expected at that spot. So your error messages were different before and after you moved the FROM statement. If you look for the little carrots, you can try to debug each error in order and might know if a change was helpful or caused another error.

It’s not necessarily easy at all, especially since you’re just starting out with Dataview. But here are the error messages you probably got and how you can at least see where in your code a problem is:

3 Likes

That worked, thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.