I am creating a complex dialog that has some "shared" dialog branches that will be "jumped to" in several places from the main dialog.
For example, I have a shared branch, "Gather lead" to gather a person's name and email address. When it is complete, I would like the dialog to return back to where it was in the original dialog stack.
So far, I've only been able to set a context variable such as "returnToNode" and then create child nodes at the end of "Gather lead" for every possible "returnToNode" which themselves have "Jump Tos"
Ideally, Watson Conversation would return where it left off before the jump?
Is that possible?
What I'm trying to achieve:
Main Dialog 1:
A -> B -> C -> Shared -> D -> end
Main Dialog 2:
E -> F -> G -> Shared -> H -> end
Shared:
X -> Y -> Z -> end
In Main Dialog 1, I want the dialog to return to D after Shared is complete. In Main Dialog 2, I want the dialog to return to H after Shared is complete.
In this case, you have to use the conditions from Watson conversation in your favor.
For example:
In your Dialogs, you will create one condition to Jump to Shared, and use the condition(user need input something) for jump to for your Shared flow.
And the D and H, you need to create some nodes with conditions to jump to H or jump to D, inside the same flow.
I created one example for you, download inside the link above.
Like:
Dialog 1: A -> B-> C-> Shared-> conditionShared+Jump to Shared -> D
Dialog 2: E -> F-> G-> Shared-> conditionShared+Jump to Shared -> H
Shared:
X-> Y-> -> END-> condition for jump to H dialog 1 D //and create for other above
condition for jump to dialog 2 H //above
See one Workspace example.
You need to follow the same logic for the nodes. If you want just set the condition and give the text for the node you want to use jump to.
But remember, your user needs to input something for choice the dialog.
Related
My form has the following sections
A
B
C
D
E
F
I have one question in section A on the basis of which it is supposed to redirect to either B or C. those filling b should be seeing c and vice versa and should directly continue to fill D E F normally. However, those filling B are redirected to C even though it says to go to section D (or 4 in the picture). What is at the end of section BThe redirection question in Section A I am not a coder (as may be apparent) but wanted to know if this a logic issue or a google forms issue
I was expecting it to skip section C and go to D, but that did not happen.
I have a combo box called status with open and complete. I also have another combo box called approvals with options pending approved or rejected.
My goal is to make the option complete in status only available if someone chooses approved in the approval combo box first. I am not sure how to go about doing this.
I made a form to mimic your form as described and cam up with the following:
Option Compare Database
Option Explicit
Private Sub Status_AfterUpdate()
If Me.Status = "Complete" Then
If Nz(Me.Approvals, "") <> "Approved" Then
Me.Status = "Open"
End If
End If
End Sub
Private Sub Approvals_AfterUpdate()
If Me.Approvals <> "Approved" Then
If Me.Status = "Complete" Then
Me.Status = "Open"
End If
End If
End Sub
This solution forces the value back to Open when anything does not match your logic. You may want to throw in a message box to so the user understands why the change is forced.
I have created a menu with different options using order 'menu'. The problem is, that I want to click one of that options and make another menu show in screen with another set of options. How can I make this kind of nested menu structure?
My code:
q=menu ('What point?:','opt1','opt2');
switch q
case 'opt1'
q1=menu('What subpoint?:','opt11','opt12');
switch q1
case 'opt11'
case 'opt12'
end
case 'opt2'
q2=menu('What subpoint?:','opt21','opt22');
switch q2
case 'opt21'
case 'opt22'
end
end
Your code is fine, except that the returned choice by menu is numeric, not the option strings. So you should use case 1 rather than case 'opt1'.
A good practice for switch is to include otherwise block, like
switch q
case 1
% do opt1
case 2
% do opt2
otherwise
disp(q)
error('Invalid option')
end
Then you will know it goes to otherwise block due to some error in your case.
I am trying to get hold of some files content I read from a file via Node.FS.Aff.readTextFile so using asynchrous effects.
However my question is more general.
myFile::forall r. String -> Aff ( fs :: FS | r) (Either Error String)
myFile file = attempt $ readTextFile Node.Encoding.UTF8 file
So I want to get at the Left or Right value. If it where Eff instead of Aff I could use
let x = unsafePerformEff $ myFile "someFile.txt"
Thanks
You should never try to "get at" the value by using unsafePerformEff, as such is truly unsafe and will introduce serious bugs into any larger code base.
Instead, you can use do notation to "get at" the values. For example:
do
result <- attempt $ readTextFile Node.Encoding.UTF8
case result of
Left error -> ...
Right file -> ...
...
Note that there exists no unsafePerformAff, because the computation is asynchronous, and there is no way to block in Javascript runtimes.
I'm currently working on a Database which requires the following functionality:
For example given a specific project, I have a series of structures which belong to that project, which are displayed in a datasheet view on the project form. I am attempting to allow the user to on double click to navigate to that specific structure which is displayed on another form. Currently I am using filters to implement this behavior, however, this results in the filter being left on, and when I manually turn off the filter, the form I switch to returns back to the first entry.
I am using the current code on the datasheet:
Private Sub struct_name_DblClick(Cancel As Integer)
LookupValue = Me.struct_ID
Form_frm_control.pg_structure.SetFocus
Form_frm_control.subform_structure.Form.Filter = "struct_ID = " & LookupValue
Form_frm_control.subform_structure.Form.FilterOn = True
End Sub
Any help would be greatly appreciated. Thanks in advance.
It all depends on what you need to do.
If you want to display all records and navigate to the selected record, then you can use bookmark navigation:
With Forms!MyOtherForm
.RecordsetClone.FindFirst "struct_ID = " & Me!struct_ID
If Not .RecordsetClone.NoMatch Then
If .Dirty Then
.Dirty = False
End If
.Bookmark = .RecordsetClone.Bookmark
End If
End With
This assumes that the other form is open with all the records loaded.
Another approach to this problem, which I find more useful for popup situations like this, is to just open the other form as a dialog and require it be closed before returning to the calling context. In that case, you'd do this:
DoCmd.OpenForm "MyOtherForm", , , "struct_ID = " & Me!struct_ID, , acDialog
You'd then have to close the other form to get back to the original context.
You might think that with large numbers of records this would be inefficient, but it's actually very fast, as this operation is highly optimized within Access (moreso than filtering an already open form, in fact).