Forum Discussion

_anomDiebolt_'s avatar
_anomDiebolt_
Qrew Elite
8 years ago

IMA Grandmaster - Does QuickBase Support Chessboard Fields?

This is a common request but unfortunately QuickBase does not have a native Chessboard field. If you put in a request over at their UserVoice page I am sure QuickBase will give your suggestion a fair evaluation.

However you are in luck as you can easily make a chessboard field even if QuickBase marketing goes thumbs downs on your request. In fact you can make any kind of custom field you like  Let me demonstrate the basic idea with a demo.

In this application we use a multiline text field to hold a chessboard position as an encoded JSON object. When using this technique you normally would not make this field visible as it will hold a raw encoded representation of your custom filed. However, since we are introducing this technique we will allow you to see the raw field and take a precaution that you do not directly manipulate the contents of this field.

The editing of a chessboard record looks like this:



You cannot directly edit the [Board Position] field. You edit the record by dragging and dropping the chess pieces and the [Board Position] will automatically update to reflect your move. If you save the record your position will be permanently saved until the next edit of the record.

Give it a try by editing and saving a record:

Chessboard Field
https://haversineconsulting.quickbase.com/db/bmpbjbbxx?a=td

Pastie Database
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=570
  • Dan, but do you validate the move either in terms of the legality of how the oieces move or more importantly, assess moves which would put the King in imminent jeopardy. Perhaps you could get a looping algorithm to look say 5 or 10 moves ahead and weight the odds of victory. QuickBase and all users may wonder why their servers have all slowed to a crawl, but it's a small sacrifice to make compared to of advancing chess algorithms.
  • I am pretty sure there are chessboard libraries that validate your moves but chessboardjs does not do this. This is the one I used so have a look around:

    http://chessboardjs.com/

    UPDATE: I should not have replied to your comment. Now I can't edit my post. This is so annoying.