sachinbaan
24th April 2018, 11:53
Hello,

I have written wrapper on standard session.

On the delete of record, system asks a question with button Yes & No.

I want to get the answer in my code, how would i get this?


Regards,
Sachin

bdittmar
24th April 2018, 15:24
Hello,
refer to ask.enum()

Regards

sachinbaan
24th April 2018, 18:01
Hi,

I want to capture the answer of standard question.

Can you please explain how ask.enum() will help, i am not able to understand.


Regards,
Sachin

VishalMistry
24th April 2018, 18:18
Hello,

domain tcyesno answer
answer = ask.enum("ttstpq0100", tcyesno.yes)
if ( answer = tcyesno.yes) then
do something
endif

Above code presents the user with message box confirming deletion of record. By default button Yes will be highlighted. User's response is captured in the variable answer.

The question code "ttstpq0100" is defined in the data dictionary, along with possible choices (yes, no).

NOTE: before performing any action (update / delete) through AFS (wrapper session), if you want to confirm with user and pass-on user's choice to the session, you can use ask.enum().

Hope this helps.

Vishal

pralash
25th April 2018, 09:37
Hi,

By using "ask.enum" function, we are getting the Message dialogue function as like in VB...

Then I don't have the idea about how to create a wrapper script for a particular session... So Please let me know the steps for creating a new wrapper script....

Thanks in advance,
Pralash

VishalMistry
25th April 2018, 09:55
Hello,

You can use the session ttstpcreatdll to generate AFS DLL for any session.

Vishal

bhushanchanda
14th May 2018, 16:24
Hello,

I have written wrapper on standard session.

On the delete of record, system asks a question with button Yes & No.

I want to get the answer in my code, how would i get this?


Regards,
Sachin

This is a good question. So, basically, the standard code already has ask.enum() being used within its source and you want to check the return value for that.

I don't think there is a way to do that without knowing the variable name which is being used for storing that enum value. If you can run a bshell trace and see if you can find it somehow, that will make your life easier. If not, go with another way.

In choice.mark.delete: section and after.choice: subsection, rewrite the same ask.enum() and ask your users to answer the question the second time saying that its a limitation and they have to deal with that until you find a solution. Now, go ahead and dig deep and find that variable name until then.

mark_h
15th May 2018, 14:58
You can also run code in debug - get to the step and let it ask the question. Step thru the question it L (at least I think that is the right command). It will display everything that is set - you can look thru it to see if you see something that might look like what you are looking for. Not sure it will work. If they just ask the question and do not store it to a variable there might not be anyway to trap it.

litrax
16th May 2018, 09:49
Use ask.enum()
Read the f... ing manual :p
http://www.baanboard.com/programmers_manual_baanerp

Under the letter "A"
http://www.baanboard.com/programmers_manual_baanerp_TopicList_A

you find the reference to the command ask.enum()
http://www.baanboard.com/programmers_manual_baanerp_help_functions_enumerates_ask_enum

Always glad I could help...

sachinbaan
16th May 2018, 09:52
Use ask.enum()
Read the f... ing manual :p
http://www.baanboard.com/programmers_manual_baanerp

Under the letter "A"
http://www.baanboard.com/programmers_manual_baanerp_TopicList_A

you find the reference to the command ask.enum()
http://www.baanboard.com/programmers_manual_baanerp_help_functions_enumerates_ask_enum

Always glad I could help...

I guess you didnt understand what i want, please refer to the reply of Bhushanchanda...

Regards,
Sachin

Gaurav Tyagi
4th September 2020, 14:42
Dear All,

Requirement -
Need to print QR code around 950 character long in BaanIVC4 BW Print Report.

Problem -
I have tried bc$ function, but found it has certain character length limit & found it only print around 200 character.

Is there also any other option available for QR code Print.

Please suggest.

Your valuable inputs are highly appreciable.

Thanks in advance.

Gaurav Tyagi(9717990219)

andreas.toepper
7th September 2020, 09:11
I think this is related to the maximum report width of 256 Chars (or 255?).
Sorry, I do not know any easy workaround around this. Maybe you can create a text file in BaanIV and send it to the printer using a shell command?

AnuKass
17th October 2020, 09:45
Hi All,
i'm using wrapper script . In this script , they use ask.enum function . but don't want to get message dialogue box and also no need to get input from user . want to send default input to ask.enum (inside script )without get pop up message (ask.enum).. I know message code also .but don't know how to suppress this message...

mark_h
18th October 2020, 16:29
Is it in a function or may just a form event? The only way I know to suppress the ask.enum is to rewrite the code itself - and basically duplication everything but the ask.enum.

vahdani
19th October 2020, 10:02
Hi Sachin,

I think by Wrapper-Script you mean AFS. If so then the way to answer the questions in original session is to use the following function:

stpapi.enum.answer("session-code", "question-code", answer)

where answer can be an enum value, etc. In your case it would be tcyesno.yes or tcyesno.no!

AnuKass
20th October 2020, 06:41
tired but still not get good result .anything i missed :confused:
|*****************************************************************
choice.cont.process:
on.choice:
execute(print.data)
stpapi.enum.answer("tisfc0520m002", "tisfc02025", tcyesno.no)
|*****************************************************************

mark_h
20th October 2020, 15:51
You send the answer before you execute the subsession:
stpapi.enum.answer("tisfc0520m002", "tisfc02025", tcyesno.no)
execute(print.data)

My assumptions is the execute(print.data) is what is sending the data to tisfc0520m0002 and executing the report.