NetTalk Central

Author Topic: Interrup the call of update form by a redirect  (Read 6834 times)

hkalmbach

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
    • Email
Interrup the call of update form by a redirect
« on: July 11, 2018, 07:26:59 AM »
Hello,

I have the following task:
- a user has a browse with orders. There he uses the change button to edit the order as usual.
- Before the order is displayed there has to be done a check. If the check is negative not the update form should be displayed but a form with some questions.
- After answering the questions and saving the question form there should be two possibilites. If the answers are ok then the update form of the order should be called. If the answer is not ok then the user should come back to the browse.
- If the first check is positive the update form should be displayed directly

Can this be solved by a redirection?
Where, in the 'procedure setup embed' of the update form?
If I am in the question form an save with positive answers, how do I get back correctly to the update form?
How to the browse?

Thanks for every help.

Cheers
Heinz

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Interrup the call of update form by a redirect
« Reply #1 on: July 11, 2018, 04:18:23 PM »
Hi Heinz,

This is a bit tricky and you'll probably get a handful of suggested alternatives.

So here are my thoughts.

1. Create a Memory Form (if all goes well this will be your question form)
2. Point your browse to this form.
3. In the Memory Form at the Procedure Setup embed, make your test to see if you can pass through to the actual DataForm, if the test is true, call it like this:
    RETURN MyDataForm(p_web,p_stage)

Try that first. I use this method for some stuff, so it will work.

If the condition fails and you don't call the DataForm, the memory form will appear.

If the answers to your questions are to be saved in the same file as you are browsing/editing it may be possible to use a normal form (but then on calling your main form and ensure the browse updates correctly is likely to be trouble some).

Give that part a go first, before I ramble on about what to next.

Regards
Bill
« Last Edit: July 11, 2018, 11:13:16 PM by bshields »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Interrup the call of update form by a redirect
« Reply #2 on: July 11, 2018, 09:24:18 PM »
I might be tempted to add the questions to the normal form, and then hide / unhide as appropriate there.

cheers
Bruce

bshields

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
    • Inhabit
    • Email
Re: Interrup the call of update form by a redirect
« Reply #3 on: July 11, 2018, 11:13:55 PM »
yeah or what Bruce said :)

DonRidley

  • Don Ridley
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 729
  • donaldridley2011@gmail.com
    • View Profile
    • Email
Re: Interrup the call of update form by a redirect
« Reply #4 on: July 12, 2018, 01:56:46 AM »
Perhaps a memory form/wizard setup?

But yeah, one form with some validation.

Don
"Eliminate the impossible, whatever remains, however unlikely, must be the truth."

NetTalk 12.55
Clarion 11

hkalmbach

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
    • Email
Re: Interrup the call of update form by a redirect
« Reply #5 on: July 20, 2018, 12:09:14 AM »
Thanks a lot. I first tried the suggestion of Bruce.
I made a tab for the questions. First this tab is displayed by hide/unhide conditions.
On this tab I placed a button which on click calls the form itself with a parameter that tells the form not to display the questions again.
Then have my normal form with lookups and so on. But now the form does not work correct any more.
- If I use a lookup that displays a browse to select from I don't get back to my form.
- If I select from a dropdown menu and save the form the value is not saved.
- If I enter a text in a text field and save the text is not saved.
I think some internal states of the form are not set correct.

What's the error?
Is it the wrong way to call the form itself when finished the question to call itself?
How can I accept the answers of the question tab, reload the form in normal way (as update form) that the form works correct?

Thanks for every help

Cheers Heinz
« Last Edit: July 20, 2018, 12:36:21 AM by hkalmbach »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Interrup the call of update form by a redirect
« Reply #6 on: July 23, 2018, 08:48:10 PM »
>> On this tab I placed a button which on click calls the form itself with a parameter that tells the form not to display the questions again.

This step is wrong.
See my reply to your other thread;
http://www.nettalkcentral.com/forum/index.php?topic=7783.0

Cheers
Bruce