question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty value in bracketed inline data overwriting default value in table

See original GitHub issue

What happened?

Screenshot_20220316-143515

This error occurred on both deesktop & mobile versions of Obsidian

Frontmatter & unbracketed key-value pairs performed as expected, however an empty bracketed inline data overwrites a table’s default value with blank. Screenshot of source & preview mode attached.

issue can be recreated :


Test1:

Test2:: [Test3::]

DQL

Table
  default(Test1, "👽") AS "1",
  default(Test2, "🛸") AS "2",
  default(Test3, "🐮") AS "3"
WHERE Type = "Test"

JS

No response

Dataview Version

0.4.26

Obsidian Version

0.13.33

OS

Windows

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
AB1908commented, Mar 17, 2022

Test1 and Test2 evaluate to undefined and null. Test2 is not indexed at all as you can see here: image

default, per the docs, changes default values for values that are null, and also appears to work for undefined. However, Test3 has an empty string "", which is not null, which is why the field is not populating as you expect it to.

0reactions
s-blucommented, Dec 16, 2022

Hello, sorry to come back to you so late. I currently go through older issues to see which are stale or already solved.

Theres a FR in #713 to be able to style non-bracketed inline fields. If I get you right, that’s what you want to have? If this is the only open point on this issue and if it’s okay, I’d like to close the issue in favor or #713.

That the bracketed inline field is set to an empty string as value is intended behaviour, as far as I can tell - in fact, it is the only way I am aware of to use an empty value.

Read more comments on GitHub >

github_iconTop Results From Across the Web

mysql - Overwrite default values from source table using union
In my table, I have few specific keys and few generic keys. Specific data can be got by combining specific key column values...
Read more >
4 Formatting Query Results - Oracle Help Center
Use format models to add commas, dollar signs, angle brackets (around negative values), and/or leading zeros to numbers in a given column.
Read more >
CREATE TABLE - Snowflake Documentation
The default value for both start and step/increment is 1 . AUTOINCREMENT and IDENTITY can be used only for columns with numeric data...
Read more >
How to overwrite default value to blank/null from - ServiceNow
Solved: Hello, In our dictionary entries for Impact/Urgency, we have default values. I have an inbound email action where I would like to...
Read more >
Postfix Configuration Parameters
Parameters not explicitly specified are left at their default values. ... Specify an empty table name to keep the information in volatile memory...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found