MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: present a database table data in user controls like combo boxes(later on for single records in edit fields too)

Mon Oct 24, 2022 2:07 pm

Hello Daniel,
as in screen shot :arrow: , If the user selects the first option, a certain dialog box should appear to him, and if he selects the second option or both, another dialog box should appear to him. How can I achieve this? I tried to use (show only if) but it did not work, I am not sure what conditions are required for each case :?: .
Thanks in advance
all the best

Mayssa

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: present a database table data in user controls like combo boxes(later on for single records in edit fields too)

Mon Oct 24, 2022 2:30 pm

Hello Daniel,
as in screen shot :arrow: , If the user selects the first option, a certain dialog box should appear to him, and if he selects the second option or both, another dialog box should appear to him. or maybe if there's show only if for push button ie: push button appears in next dialog only if the second or both choices have been selected. How can I achieve this? I tried to use (show only if) but it did not work, I am not sure what conditions are required for each case :?: .
Thanks in advance
all the best

Mayssa
Attachments
optional features to install.png
optional features to install.png (24.28KiB)Viewed 18455 times

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: present a database table data in user controls like combo boxes(later on for single records in edit fields too)

Tue Oct 25, 2022 10:20 am

Hi Daniel,

I solved the Previous problem and got the required options.
But I have other questions now:
1. after downloading the program and when I configure in ODBC: (Microsoft SQL Server DSN Configuration),in the field ( Change the language of SQL Server system messages to:) instead of English language I get the number 1033 and instead of German language I get the number 1031.What is required is to get the language as text and not as number.
2. in case the user did not select a site from the list as in screen shot, but created a new one, how can I add this new site information (code, discription to the database table with the other sites? Link this entry with the push button "Install".
I highly appreciate any help.

best regards

Mayssa
Attachments
ODBC-Datenquellen-Administrator.jpg
ODBC-Datenquellen-Administrator.jpg (97.23KiB)Viewed 18445 times
information of the new site.png
information of the new site.png (20.38KiB)Viewed 18446 times
create anew site.png
create anew site.png (24.53KiB)Viewed 18446 times

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: present a database table data in user controls like combo boxes(later on for single records in edit fields too)

Tue Oct 25, 2022 3:15 pm

Hello,
I try this what in screen shot. but I'm not sure. is so okay or should I something else trying.
and I need to enter this value in a registery so is this code in red cercle right for this?
thanks for helping in advance.

best regards

Mayssa
Attachments
SQL Script.png
SQL Script.png (96KiB)Viewed 18442 times

Catalin
Posts: 6543
Joined: Wed Jun 13, 2018 7:49 am

Re: present a database table data in user controls like combo boxes(later on for single records in edit fields too)

Wed Oct 26, 2022 3:42 pm

Hello Mayssa,
1. after downloading the program and when I configure in ODBC: (Microsoft SQL Server DSN Configuration),in the field ( Change the language of SQL Server system messages to:) instead of English language I get the number 1033 and instead of German language I get the number 1031.What is required is to get the language as text and not as number.
Please note that this might not be possible. Most likely, this is how the developers of the ODBC setup package have configured it.

From what I can see, those are based on the ProductLanguage property.
2. in case the user did not select a site from the list as in screen shot, but created a new one, how can I add this new site information (code, discription to the database table with the other sites? Link this entry with the push button "Install".
Regarding this, you should save the results in properties (the property assigned to the "Code" field and the one assigned to the "Description" field) and then add these to your database.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

Re: present a database table data in user controls like combo boxes(later on for single records in edit fields too)

Wed Nov 02, 2022 11:15 am

Dear Catalin,

Thanks for the fast reply! This does not answer my questions completely. I'll try again to explain my problems:
1. Is there already an existing function that translates the https://www.advancedinstaller.com/user- ... guage.html Code to its Language string?
2. Is it possible to print/log text when executing an SQL script for debugging reasons?
3. I want to call a function in SQL and then assign its return value to an Advanced Installer property.
In my screenshot below you can see that I tried to assign the value of "@NewSiteID" to the property "$SiteIDProp$" which I replaced using the Replacements Tab with "[SELECTED_SITE_PROP]". Is this possible somehow?
SQL_assign_property.png
SQL_assign_property.png (48.21KiB)Viewed 18030 times
4. I also tried to achieve 3. using an Advanced Installer SQL Query but as soon as I am adding the "EXEC @NewSiteID = ..." line it is failing to assign the ID. Is the exec statement somehow not executed poperly here?
SQL_assign_property_in_query.png
SQL_assign_property_in_query.png (51.54KiB)Viewed 18020 times
best regards

Mayssa

Catalin
Posts: 6543
Joined: Wed Jun 13, 2018 7:49 am

Re: present a database table data in user controls like combo boxes(later on for single records in edit fields too)

Mon Nov 07, 2022 11:51 am

Hello Mayssa,

Please allow me to address your questions below:
1. Is there already an existing function that translates the https://www.advancedinstaller.com/user- ... guage.html Code to its Language string?
I'm afraid not. Please note that this might not be achievable, since you are using a setup that may have not been created with Advanced Installer anyway.
2. Is it possible to print/log text when executing an SQL script for debugging reasons?
Not quite sure this is possible. However, you could enable logging for your scripts through the "Log errors to file" option (this has been renamed, from what I can see, to "Log information to file" - we will update the user guide accordingly)
3. I want to call a function in SQL and then assign its return value to an Advanced Installer property.
In my screenshot below you can see that I tried to assign the value of "@NewSiteID" to the property "$SiteIDProp$" which I replaced using the Replacements Tab with "[SELECTED_SITE_PROP]". Is this possible somehow?
I am not an expert in SQL, but is it even possible to give value to a function? For instance, can you do this outside of Advanced Installer?
4. I also tried to achieve 3. using an Advanced Installer SQL Query but as soon as I am adding the "EXEC @NewSiteID = ..." line it is failing to assign the ID. Is the exec statement somehow not executed poperly here?
Here, most likely, it is not possible to achieve your needs through an SQL Query. The query, as the name suggests, should only be used to query a database (e.g. using SELECT statement).

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

MGS
Posts: 83
Joined: Tue Oct 04, 2022 9:52 am

hide/show a butten in dialog

Tue Nov 08, 2022 3:31 pm

Hello,
Thank you for your answer. Now I have another question, please:
I want to make a control condition for the button (creat a new site) as in screen shot . That is, if the user chooses both of options, the button will appear, and if he chooses only the first option, - where the second option includes service files- the button will not appear. Can you help me with this, thanks.
best regards
Mayssa
Attachments
createANewSiteButton.png
createANewSiteButton.png (27.08KiB)Viewed 17805 times
Features selection box.png
Features selection box.png (24.42KiB)Viewed 17805 times

Catalin
Posts: 6543
Joined: Wed Jun 13, 2018 7:49 am

Re: present a database table data in user controls like combo boxes(later on for single records in edit fields too)

Wed Nov 09, 2022 4:12 pm

Hello Mayssa,

First of all, in order to achieve that, we would need to have the dialogs in the correct order - so make sure the "OptionalFeatsDlg" dialog is scheduled before the "SiteSelection" dialog.

You can then use a control condition for that button, as it follows:

Code: Select all

(!Feature=3 AND &Feature=3)
meaning:

- if Feature is not installed (!Feature=3) and it will be installed locally (&Feature=3)

and "Feature" being the identifier of your feature. You can see this in the "Organization" page --> click on your feature --> "Identifier" field.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”