join() function in helper library?

This sub-forum is for discussing all topics related to AppGini Helper JavaScript Library, provided by bizzworxx as a third-party AppGini plugin.
Post Reply
eagle
Veteran Member
Posts: 39
Joined: 2013-01-09 15:38

join() function in helper library?

Post by eagle » 2021-01-27 12:29

Is the join() function implemented in the current helper library?

I have been trying to follow https://appgini.bizzworxx.de/appgini/hi ... w-columns/ but I can not get it to work.

I have created the file tablename-tv.js and inserted this

Code: Select all

jQuery(document).ready(function() {
  var tv = AppGiniHelper.TV;
  .join("description", ["consequence", "probability"], "Heading");
});
but nothing seems to happen...

Thanks for all help!

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: join() function in helper library?

Post by jsetzer » 2021-01-27 12:42

Yes, it is included in latest version for testing purposes.

Default

chrome_2CY4F0nOVG.png
chrome_2CY4F0nOVG.png (3.79 KiB) Viewed 2515 times

Code

Code: Select all

// file: hooks/TABLENAME-tv.js
jQuery(document).ready(function () {
    AppGiniHelper.TV.join("CustomerID", ["CompanyName", "ContactName"], "Joined Column", true)
});
Joined

chrome_R3FHnlvrEH.png
chrome_R3FHnlvrEH.png (5.81 KiB) Viewed 2515 times
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: join() function in helper library?

Post by jsetzer » 2021-01-27 12:47

var tv = AppGiniHelper.TV;
.join("description", ["consequence", "probability"], "Heading");
There is a syntax error in your code between TV; and .join.

It has to be tv.join(...);

Recommendation

I strongly recommend using a modern code editor like Visual Studio Code (free) which will highlight errors while writing.

Code_GYkkoE62LS.png
Code_GYkkoE62LS.png (8.63 KiB) Viewed 2515 times

This will safe time... yours and also mine ;-)
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

eagle
Veteran Member
Posts: 39
Joined: 2013-01-09 15:38

Re: join() function in helper library?

Post by eagle » 2021-02-15 13:25

Thank for helping but I still can't get it to work.

This is my code:
a.png
a.png (7.27 KiB) Viewed 2458 times

And this is the result:
b.png
b.png (14.78 KiB) Viewed 2458 times
Don't know if this is enough to push me in the right direction, not nothing seems to change when using the code.

Thanks for all help.

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: join() function in helper library?

Post by jsetzer » 2021-02-15 14:20

Did you clear browser cache?
Are there warnings or errors in console?
Any syntax errors highlighted in your code editor?

Can you please put a console.log("test"); immediately before that JOIN line and check that logging in console to ensure the code gets executed at all.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

eagle
Veteran Member
Posts: 39
Joined: 2013-01-09 15:38

Re: join() function in helper library?

Post by eagle » 2021-02-15 14:52

> Did you clear browser cache?

Yes. Also tried different browsers.

> Are there warnings or errors in console?
d.png
d.png (27.9 KiB) Viewed 2448 times
> Any syntax errors highlighted in your code editor?
Not that I can see...
f.png
f.png (8.71 KiB) Viewed 2448 times
> Can you please put a console.log("test");
Done that now, but not sure where I would look for this output...

User avatar
onoehring
AppGini Super Hero
AppGini Super Hero
Posts: 1156
Joined: 2019-05-21 22:42
Location: Germany
Contact:

Re: join() function in helper library?

Post by onoehring » 2021-02-15 16:07

Hi,

you should see the output ("test") in the console window of which you made a screenshot in your posting (or course, the page needs to load and the code should be run).

Olaf

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: join() function in helper library?

Post by jsetzer » 2021-02-15 16:11

After you have put the .log command before the line with the join command there should be log entry "test" in console output.

From your screenshots I can see three problems:

1) you did not put the console.log command immediately before the join line but before the .ready event.
2) there is no "test" output in console
3) there is a red error telling us there is an include missing

2nd issue tells me that your code for logging does not get executed. I guess this is because of the (red) error. The error is not caused by our library but by a missing language file for NL for your datepicker control.

I recommend fixing the error first and then continue working on the tv.join command. It should work after you have fixed predecessing javascript errors.

You can ignore the yellow warnings. only the red errors stop execution of subsequent commands.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply