show next prompt based on answering the current prompt in ODK - odk

I am new to ODK and I am trying to create an XForm in ODK and the following is the issue i am stuck in.
PROBLEM:
The user selects Gravel, Drainage or Unimproved from the first prompt. The next prompt is about the rating for the item selected in the previous prompt. Now I need to set rates 1 to 5 if Gravel is selected and 1 to 4 if any other is selected in the previous prompt.
What I have done:
I have set two prompts (Paser_Rates and Paser_Rates2), each has its own binding that the correct one is displayed based on the selected prompt.
<bind nodeset="/widgets/main_repeat/PaserRates" relevant="not(selected(../RoadType, 'gravel'))" type="select1" required="true()" saveIncomplete="true()" />
<bind nodeset="/widgets/main_repeat/PaserRates2" relevant="selected(../RoadType, 'gravel')" type="select1" required="true()" saveIncomplete="true()" />
This does not solve my problem because I am not supposed to have two prompts and I need to save the rating values in one column (Paser_Rates).
Please let me know what solution you have for this.

XForm terminology:
The way to do this is to use itemsets with a secondary instance that contains your choice lists. Instead of relevants use an XPath predicate to determine which choices to show.
XLSForm terminology
This (and any other form) will be much easier if you use XLSForm to create your XForm. You need to create a cascading select and use a choice filter instead of a relevant to determine which choices to show.

Related

Salesforce Screen flow search and display record information

I'm working on a screen flow. The idea is to have a lookup component the user can search a contact. Then I would like to display the information from the Contact (Account Name, Contact Name, Number Email) and I would like to be able to have the user update that information if needed. I just stomped on how it can be done. I know it should be able to be pulled from the record ID in some type of way and maybe use an Assignment to display the information. Can someone guide me on a next step or if anyone has an instructional video would be helpful.
Thanks
You wouldn't be able to display the looked up contact's fields on that screen as soon as you populate that field. That would be something only possible in code (aura component or lwc).
What you can do, however is -
Get Record element after that screen element. (Get Contact, where Id = lookupcomponent.recordId)
Then EITHER:
use the new Fields (BETA) option on another screen Fields (BETA)
(this method is easier, doesn't have as much control and is limited on fields, depending on data type, you can use)
add inputs one by one and set the default values Add Fields One By One
(this method allows more control)
Then, you will need an update element. If you used the Fields (BETA) you can just update the record variable. If you did the inputs one by one, you will need to update the contact and set fields individually.
Full Flow Example

How to show variable's value in Dialog Name (Einstein Bot)

I need to show the Product's Name in the Menu, I think image says it all:
Click here to see the image
I have a menu, with two options, and the first show a text with a variable, but {!Product} don't works, there is a way of this work?
When I put {!Product} in Message or Question, this works normal...
I didn't find any solution for showing the variable in the title dialog, my solution was to change the message to "Know more about this product", I left a generic message.
Old topic but the answer might help someone.
There's a great article explaining how to get some dynamic information https://www.infallibletechie.com/2021/11/how-to-create-case-from-einstein-bot.html
In your case, I guess you need to
Query your products (the out-of-the-box Einstein Bot query is simple and has a limit of 3 items but you could call a flow or apex to get better granularity on the filter/logic and control le size)
Store the query result in a Custom record list Variable
Query data with a flow
Use a dynamic question and merge fields to display what you want
Top configuration of the dynamic question
Down configuration of the dynamic question

SSRS default values

Ordinarily, this is a very simple thing. My issue is I can't seem to get multiple values, so I'm guessing it's a format issue? In my report, here are the default values:
When I preview the report in VS, it shows up exactly as it should, and obviously, I have the multi-select setup correctly:
NOTE: The values of 2 and 3 are the ID's in the query. This is done to utilize the indexing on these values as opposed to just pulling up a big list of strings, so it's finding the ID but actually displaying the "description" in the drop-down.
After the report has been deployed, I discovered that within the options of the report (click report, go to Manage, then navigate to Parameters) this is where there seems to be the hang up. I can select just 2 or just 3 and there's no problem, it will use either of them as the default. I've tried various formats to use 2 AND 3 but have had no luck and get the error The value provided for the report parameter 'Model' is not valid for its type. (rsReportParameterTypeMismatch). I'm not sure why the default values selection in my first screenshot doesn't take care of this, but for whatever reason, the last screenshot appears to override this functionality. Any idea as to how I might get my 2 values?
I figured it out. Pressing enter to go to the next line, no comma or other separator will get this to work.

How to specify PathToSubformControl for BrowseTo in access 2010

Could someone help me with BrowseTo macro plsease? I cannot figure out one of the arguments in the this macro in ACCESS 2010 which is PathToSubformControl. I have this Form called "frm_navigation":
The names of all Tab are: nav_vacancies, nav_contacts, nav_organizations etc.
The field "Organization name" in the figure will hold the name from another table tbl_organizations. However, the Tab "Organizations" (the third from left) will display all info from the table tbl_organizations.
I would like to program a button that takes me to Organization Tab and set a current record according to the name displayed in the field "Organizations name".
So far I did it via DoCmd.OpenForm but it filters out all other records and opens a new window. I tried to set BrowseTo action as follows:
DoCmd.BrowseTo acBrowseToForm, "frm_Organizations", "frm_navigation.nav_organizations", "[tbl_organizations].[PR_ID]=" & Me.cb_org_name.Value
but I've got runtime error as my PathToSubformControl is wrong. How am I supposed to specify the path? I cannot understand the structure. It's supposed to follow this pattern: MainForm1.Subform1 > Form1.Subform1 but it's not explained what is what.
Thanks
Very late reply, but...
In your code, "frm_navigation.nav_organizations" needs to specify the name of the NavigationSubForm subform control (by default it is NavigationSubForm).
Let me try to re-state your command with generic names:
DoCmd.BrowseTo acBrowseToForm, "frmToDisplayInNavSubCtl", "frmMainFormContainingNavSubFrmCtl.NavSubFrmCtl", ....criteria....
So, in short, you need to go into design view on your frm_navigation form and determine the name of the NavigationSubForm control, not the names of the navigation buttons (e.g., nav_organizations, nav_vacancies, etc.) and use that after the dot, instead of .nav_organizations (the name of the button control).

Report Builder 2.0 Create a dataset with Parameters

I cannot get my dataset to recognise a parameter supplied to it.
I have created a report parameter "ProjectID".
(In Report Parameter Properties, Name="ProjectID", Prompt="ProjectID").
In Dataset Properties|Parameters, Parameter Name="ID", Parameter Value="[#ProjectID]".
When I click on the Filter button in Query Designer, the "Projects with" panel says:
"? ID equals (unspecified)".
But when I run the query I'm not prompted to enter a parameter value, and multiple rows are returned.
I should stress that I'm simply trying to replicate the functionality of a pre-existing report where all this works exactly as expected.
When I diff the rdl files of the two reports there are obvious differences, and I can hack the xml (of the semantic query) so that it works, but I don't really have the understanding of why it's working, or how to replicate the necessary changes via the GUI.
Can someone please give me some pointers - preferably without referring me to the documentation as I've been through this numerous times as well!!
Thanks in advance,
Peter.
p.s. I can post some of the rdl differences if that will help, but wanted to keep my initial post clear and to the point.
OK, so what you need to do is when in the Filter screen of the Query designer, assuming you've already specified a filter in the main pane, such as:
"ID equals (unspecified)"
You need to click on "ID" and a context menu appears with "Edit as Formula", "Prompt" and "Remove Condition".
Select "Prompt", and there you go.

Resources