Button questions

947
6
10-25-2021 04:32 PM
elpinguino
Occasional Contributor III

Hi EB community,

A few button (coding?) questions for ya.

1. Is it possible to have a sidebar pop-up from a button?

I've created a button, went to set link, link to window, but it doesn't appear in the select a window list. It is in the window list though on the left hand side of the page.

elpinguino_2-1635203796356.png

 

elpinguino_1-1635203452973.png

2) We have different landholder forms for different clients. Is it possible to set up this button in the list so it is queried to open the window with the survey form (view) specific to Client A? I will set up specific survey form windows for Clients B and C too since their questions/design are all different. 

elpinguino_3-1635204665026.png

 

3) Similar to question 2, some of the operations are ground, some are aerial. Only the aerial operations require water supply forms to be filled out. Is there a way so the water supply form BUTTON only appears if it is an aerial operation?

I'm beginning to use Experience Builder a lot and have found it quite good as a non-coder/developer, but there are some areas like these where I think it is/should be possible, but don't know exactly how to do it myself.

Any help/tips you can offer will be greatly appreciated!

0 Kudos
6 Replies
ShengdiZhang
Esri Regular Contributor

Hi @elpinguino ,

For the first question, this is because the window is set as splash, and a splash window will not show in the set link.

ShengdiZhang_0-1635212976999.png

Shengdi

elpinguino
Occasional Contributor III

Thanks for explaining that one @ShengdiZhang ! Any suggestions for questions 2 and 3?

0 Kudos
ShengdiZhang
Esri Regular Contributor

Hi,

For Question 2:

You said there is a client field in the feature layer. So you can try connecting the button widget to a data, and then use an expression as the URL input:

ShengdiZhang_0-1635217468118.png

ShengdiZhang_1-1635217491066.png

With the above settings, when the end user selects a record, the button URL changes with the change of the selected feature.

For question 3, unfortunately, I don't think it is possible at present.

 

Shengdi

 

elpinguino
Occasional Contributor III

Hi @ShengdiZhang , Thank you for explaining that. The screenshots are helpful. I don't know/understand enough about expressions and Experience Builder to set this up though without more instruction.

In the Expression window, how would I write the expression to open Client A's completed form?

elpinguino_0-1635222749137.png

Some context, each client has their own specific Survey123 landholder form.

The plan (if there's a better workflow/widget for this, let me know.) is 

1. click Landholder form button

2. button opens up sidebar that contains the client's form. If the form has been filled out, that will show via the survey widget (set to view only).

That's what the front end looks like. On the backend there's 1 landholder form button, 3 sidebar windows which contains one form for each client.

 

0 Kudos
ShengdiZhang
Esri Regular Contributor

Hi,

If you want to use a button to open up a window to show the corresponding survey, here is the workaround:

You can put an Embed widget in the sidebar window, and use the Embed to display the survey. Then, when the end user selects a record, the embedded widget displays the corresponding survey.

ShengdiZhang_0-1635233633571.png

You can add another column to the current feature layer to store the survey URL, but this may require a lot of effort.

An easier way is to create another feature layer using only the client id and the survey URL:

ShengdiZhang_1-1635233765957.png

You need to add a message action on the list widget (or other widgets that are used to display info) to build the connection between the two feature layers:

ShengdiZhang_2-1635233885551.png

And here is how it looks at runtime (you don't need to add the table widget to display the survey URLs, I add it to tell you which records are selected):

Shengdi

0 Kudos
elpinguino
Occasional Contributor III

Hi @ShengdiZhang thank you for your thorough (and quick!) response. I will give this a go today. I'm wanting to show the survey record (view only and one that's already been filled out), not show a survey ready to be filled out. Sorry. I don't know if I made that part clear, but it is the record (already submitted survey response that I want to pull up. )The survey widget has been good for this, although I need the interaction between the button and form to know which of the three forms to pick based off of the client name.

elpinguino_0-1635275843563.png

 

0 Kudos