POST
|
There is a Distinct function available in Arcade you can use to do this, however, you need to have an Array to return the unique values from. If you populate your result values into an array, you can use the Distinct function to return the unique results. If you are happy with returning an array, then you can use the script below: var fs = FeatureSetByName($map, "returnDistinct" , ['*'], false);
var fsArray = Array(1);
var fsCount = Count(fs);
// check for features
if (fsCount > 0) {
for (var f in fs) {
// for each feature, add to the array
Push(fsArray, f.name)
}
} else {
return "No records available";
}
// return distinct values
return Distinct(fsArray); If you prefer to return a text string instead, I modified the script slightly so that you can do that too. Just noting however that the first line returned is a "null" value creating an empty first line, which is why I've also added an Erase function to remove the 0 index. var fs = FeatureSetByName($map, "returnDistinct" , ['*'], false);
var fsArray = Array(1);
var fsCount = Count(fs);
// check for features
if (fsCount > 0) {
for (var f in fs) {
// for each feature, add to the array
Push(fsArray, f.name)
}
} else {
return "No records available";
}
// return distinct values
// return Distinct(fsArray);
// return distinct values text
Erase(fsArray, 0); // remove 0-index "null" field
return Concatenate(Distinct(fsArray), TextFormatting.NewLine); I hope that helps!
... View more
2 weeks ago
|
0
|
0
|
42
|
POST
|
In your form it looks like you've forgotten to reference the csv file after select_one_from_file. If you add the file name after this it should work - e.g. select_one_from_file filename.csv
... View more
2 weeks ago
|
0
|
1
|
178
|
POST
|
You can use Arcade to return a count of attachments. You can do this in ArcGIS Pro or ArcGIS Online. You could also choose to apply this to symbology to see which features have attachments, or you could use this in a field calculation to write the total number of attachments to a given field. If you don't want to modify your schema by adding a field for this, in ArcGIS Pro you could create a selection of features with attachments and then export a csv file from that. Hope that helps. // Returns the number of attachments associated with the feature
Count(Attachments($feature)) Here is a link to the Arcade documentation for Attachments.
... View more
2 weeks ago
|
0
|
0
|
41
|
POST
|
You can use a simple condition expression in your report template to only show questions if an answer has been provided. The most basic syntax to show something in a report if there is an answer provided to a survey question is: ${if <fieldname>} ... ${/} Please note to substitute in your own fieldname, and don't include the < or > either. Within this (where I have typed ...) you can put in the value for this question (e.g., ${question1}, along with anything else, such as the question text itself. This then sets up your report so that the question does not appear in your report unless that question has been answered. This is the most basic example, as you can do many other things like only show the content if they answered option a, or a value over a certain number value, etc. You can read more about this under the Conditional report elements heading in the official documentation.
... View more
2 weeks ago
|
0
|
0
|
85
|
POST
|
This is a great reason to use Arcade. Here is some Arcade you can apply to your label settings. I have also added a text conversion to the DTI field so that if you do eventually change this to a numeric field it will still work. var ia = $feature["IA_Cause"];
var dti = $feature["DTI"];
var label;
if (IsEmpty(dti) == false) {
label = ia + " " + Text(dti) + "m";
} else {
label = ia;
};
return label;
... View more
2 weeks ago
|
2
|
0
|
62
|
POST
|
It could be any number of reasons, and I've found a few quirks and questions of my own when testing things out. When adding your own app to a Teams tab, I have had no issues embedding an app directly, and so long as other Teams' members have access to the content in ArcGIS, they are able to access the content too. However, when adding content owned by others things become a bit confusing as from what I can work out I can add content that I don't directly have access to yet I can still find in the search content options when setting up the ArcGIS for Teams tab. Also, sometimes these apps embed directly and other times the item details page gets embedded. I am not quite sure why one or the other happens. Anyways, regarding your question, because you're an admin perhaps check that you in fact have shared access to the content instead of leveraging your admin powers? There may be something odd happening there, at least might be my guess. Hope that helps!
... View more
02-06-2024
01:50 PM
|
0
|
1
|
61
|
POST
|
Thanks for the early notice on Website tabs in Teams. However, I've been embedding a dashboard into Teams using ArcGIS for Teams, not by using the Website tab, which I see as different. Whether ArcGIS for Teams is impacted by this change, or isn't, I just wanted the share these specifics.
... View more
02-04-2024
10:10 PM
|
1
|
1
|
90
|
POST
|
I had the same issue adding an app to a Teams group. The error message is saying there is an issue with the pop-up prompt with an ArcGIS Identity input, i.e. requirement to sign in to an account to access the content. The app I was embedding is not public, and it had other embedded content from ArcGIS Online. I found that removing the embedded content fixed the problem, so my guess is there are some authentication issues with trying to access content indirectly. Might not fix everyone's problems, but sharing what worked for me.
... View more
01-30-2024
03:04 PM
|
1
|
0
|
104
|
IDEA
|
I think it would be useful to be able to to filter attachments by file type, or even based on values such as file names, within the web map pop-ups settings. I use Survey123 for a lot of field activities and these features often have many photos, as well as a signature attachment. Recently I have created an automated workflow to re-attach reports generated from Survey123 to the feature record, allowing for users to retrieve any report from any record at will. However, this report can become lost amongst the (sometimes) dozens of photos that are attached. Ideally, when configuring pop-ups it would be useful to create a second attachments content item that I could filter to only include the report (a word document in this case) that I could separate from the photos (and signatures) and make more easily accessible to users. I have played around with Arcade and have been able to return things from attachments like file extension types and file names, but there is no configuration options that currently support filtering which attachments are included in a pop-ups attachments. As another example, while signatures are great for reports they are not as relevant in pop-ups, and I have noticed this to be a particular annoyance when using Instant Apps such as Attachment Viewer as it can become littered with dozens of signatures that serve no benefit in this context. Perhaps this is more of a nice-to-have, but in terms of the usability of my dashboards and map's pop-ups I would find this very beneficial.
... View more
01-08-2024
04:53 PM
|
2
|
0
|
173
|
IDEA
|
I would find this useful as well! Example case: I am currently working on a project where it has been requested to create pages in different languages (english and te reo). The best way I can work out doing this is creating copies of the pages and then translating them on the new page. I plan to setup two buttons for the user to 'change languages', but really this just directs to the main page in either language. Ideally I would like to insert a menu navigation widget on each of these pages for navigating the sub-pages in each language, however, the current menu widget settings include all pages (that are not hidden of course). It would be great to have the option to select from a picklist of pages to be included. While I can use buttons (which I'll have to do for now) the user experience is better when the button's effects are responsive to the active page.
... View more
10-12-2023
01:39 PM
|
0
|
0
|
147
|
IDEA
|
Agree with adding transparency options to image widgets please. I often find myself uploading an initial image to an experience and then creating multiple more transparent/lighter/darker versions in a separate photo editor to get the contrast right with other elements. It creates a lot of back-and-forth effort and unnecessary uploaded images.
... View more
01-10-2022
04:38 PM
|
0
|
0
|
747
|
BLOG
|
From skimming the above comments I think I may be having the same or a similar issue as others; I'm hoping someone has a recommendation. I'm having an issue with formatting the dateTime field, as the data seems to vary based on whether the user is using the Survey123 app, or a web browser. I've attached several images below. Please note, Time of Departure/Return are dateTime fields defaulting to now(). Estimated Time of Return is a time field with no default. 1) Date entry within Survey123. 2) Date entry in web browser (mobile). 3) The data seems to be recorded the same, as seen in the Survey123 website data tab. However, the formatting is not quite working or matching up depending on when a dateTime value, or time, is submitted via a web browser. This doesn't happen when using the Survey123 app though 4) As a workaround, I've tried formatting the date info within the survey form itself as a hidden text field, and then just passing the string. In the Survey123 website data tab I seem to get an error though. The top record is data from using the Survey123 app, the bottom record from using a web browser. Any suggestions how to tackle this? Thanks
... View more
04-27-2020
08:01 PM
|
1
|
0
|
8386
|
POST
|
The way I have it set up is using the distinct pulldata() function for species in a calculation for each associated plant type, which there aren't too many categories for. These are essentially just Boolean returns. I've then got a hidden species_check question using an if() calculation assessing if all the distinct checks return true. If any return false, as in a duplicate species has been selected for that plant type, the species_check returns a false; likewise, if all checks return true the check passes and returns true. I'm using this true/false return as a constraint on my select_one species in the repeat. This works for me as it triggers the constraint if they select the same species and then try to pass the repeat record. Make sense? Hope that helps.
... View more
03-10-2020
06:03 PM
|
0
|
2
|
892
|
POST
|
Great question! I had to check but seems to work fine.
... View more
03-03-2020
04:53 PM
|
0
|
4
|
3957
|
POST
|
Thanks for your quick response Doug. I gave this a go, but then found this post (Can I prevent a value from being submitted multiple times in a repeat question? ) and was able to use a JavaScript function to do this. I appreciate the help though!
... View more
03-02-2020
07:41 PM
|
0
|
6
|
3957
|
Title | Kudos | Posted |
---|---|---|
2 | 2 weeks ago | |
2 | 01-08-2024 04:53 PM | |
1 | 02-04-2024 10:10 PM | |
1 | 01-30-2024 03:04 PM | |
1 | 09-04-2019 09:49 PM |
Online Status |
Offline
|
Date Last Visited |
16 hours ago
|