Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Query Builder Request

Questions related to using nuBuilder Forte.
Post Reply
treed
Posts: 205
Joined: Mon May 18, 2020 12:02 am
Been thanked: 2 times
Contact:

Query Builder Request

Unread post by treed »

I just spent a bunch of time rebuilding a complicated where clause that was overwritten when I opened the query builder without remembering that I had manually entered changes. I understand it would be really difficult to make a bi-directional query builder, however it might be pretty easy to just look at the length of the stored query for the browse screen vs. the one stored for the query builder and let the user know they are/maybe about to overwrite something important.
kev1n
nuBuilder Team
Posts: 4307
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 448 times
Contact:

Re: Query Builder Request

Unread post by kev1n »

treed,

Thanks for your input. Inputs help improve nuBuilder!

I think it can easily be done by checking the current sql with the one from the SQL Builder. If they don't match, show a warning.
nuselect_warning.gif

In the meantime, add this snippet in the (Setup ->) Header (Click Save and log in again to test it).

Code: Select all

function nuOnLoad() {
	if (nuCurrentProperties().form_id == 'nuselect') {
		var s = $("textarea[id='sfo_browse_sql']", window.parent.document);
		if (s.length == 1) {
			if (s.val() !== $('#sse_sql').val()) {
				nuMessage([nuTranslate('<b>Caution!</b><br>The Browse SQL was changed manually and will be overwritten when changes are made.')]);
			}
		}  
	}
}
You do not have the required permissions to view the files attached to this post.
admin
Site Admin
Posts: 2815
Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 25 times

Re: Query Builder Request

Unread post by admin »

treed,

Setting SQL to Edit Manually will stop this from happening
man.PNG
I have added this explanation to the Wiki...

https://wiki.nubuilder.cloud/ ... uilder#SQL


Steven
You do not have the required permissions to view the files attached to this post.
Post Reply