Ancestor queries using the new Google Cloud console UI - google-app-engine

How can I specify an ancestor query using the new Google Cloud Storage UI?
The image above shows the field to specify the query. I'd like to query for a User that has a specific parent id.
How'd that be?
P.S. It'd be great if Google adds some sort of documentation to this UI.

You can use try this using GQL syntax using this tab showed in the pictured attached.
Try something like this:
SELECT * YOUKIND WHERE key HAS ANCESTOR KEY(Person, 'Amy')
Reference : https://cloud.google.com/datastore/docs/apis/gql/gql_reference

Related

No hyperlinks in resultset classic console or snowsight

I have seen many examples of having active hyperlinks in the resultset in either the classic console or snowsight in Snowflake. However, all i get is the text of the address and i cannot click on it. I did come across an article explaining it depends on the application. It also says that Chrome will make a hyperlink of the text. But that is not the case with me. Neither Edge or Chrome makes active hyperlinks of the addresses. Things i tried. Querying a directory table and see the result of the file_url field. The address is there, but no hyperlink. I also tried to create a custom table that holds a address, but also no hyperlink on the result. Is there a certain setting that i am missing in either classic console/Snowsigth or webbrowser?
Kick
I'm on MacOS, using Chrome. The following query on Snowsight generates a result set that contains a url and is clickable:
select 'http://www.apnews.com' from dual;
Screenshot of result showing active URL:

ReactGA not working for G type tracking Id

I am trying to implement google analytics in my reaact application. But does give any page hit in analytics dashboard.
Here is the implementation:
In App.js:
import ReactGA from "react-ga";
componentDidMount() {
ReactGA.initialize("G-QBQXxxxxx");
ReactGA.pageview("/")
}
Anything wrong in my implementation ?
Based on react-ga docs, it is designed to work with Universal Analytics which was the latest version of Google Analytics until Oct 14, 2020. Since then, GA-4 is the default property type in Google Analytics. You need to create a property of type Universal Analytics. To do so, go to Google Analytics Home page and go to Admin.
Select the Account that you want to add a Property to and click on Create Property.
Now you proceed to Property setup page. (Also you could have created a new Account and after setting its name in the second step you would have seen Property Setup). Then click on Show advanced options.
Enable Create a Universal Analytics property and select one of the available options. If you select Create both a Google Analytics 4 and a Universal Analytics property, you will have two different properties one having a MEASUREMENT ID like GA-XXXXXXXXXX and another having a Tracking ID like UA-XXXXXXXXXX. Use the Tracking ID instead of MEASUREMENT ID.
Instead of using the Measurement ID (which begins with "G-"), set up a Universal Analytics ("Web") property (Universal Analytics properties have views instead of data streams), you have a Tracking ID (which begins with "UA-"), and then
import ReactGA from "react-ga";
componentDidMount() {
ReactGA.initialize("UA-XXXXXXXX");
ReactGA.pageview("/")
}
It works just fine
The Universal Analytics id its going to be desappear in 2023 July 1° and the react-ga is outdated, because only works with UA code.
For this reason, you can use react-ga4, and you can use the Measurement ID (which begins with "G-")

Best way to implement custom search form

Firstly, I am a Drupal newbie and am still alien to many of Drupal's core concepts. My questions probably seem lame but .... I am trying my best.
I want to implement a custom search form like in the picture attached.
Hotel, flight, etc. are taxonomy terms.
Depending on the taxonomy term selected, the parameters below will also change, like in the picture below:
I came across Drupal Search API. I saw the Munich DrupalCon screencast on search api.
http://www.youtube.com/watch?v=rArRwp_1h8Q
From what I have seen so far, I am not sure whether this can be implemented using Search API.
I know this can be implemted using Forms API (I will create the form manually).
I want to know which way will be faster, Forms API or Search API.
I am using : Drupal 7.26
A simple way is to build a regular view with exposed filters.
To add and configure a views exposed filter:
Go to your views edit page.
Create the filter criteria that we want our users to be able to control, by clicking the "Add" button, in the filter criteria box.
Choose the fields that you want your users to be able to filter through them and click "Add".
In Configure filter criterion, check the option Expose this filter to visitors, to allow them to change it.
Configure the rest of the settings to your liking and click "Next".
After saving the view, this filter should be exposed to your users and they are able to search your view.
For a demo with screenshots; Check this tutorial.

Can I add a custom widget to Salesforce Service Cloud Console?

I need to have a custom widget on Salesforce Service Cloud Console. I don't really care where it is as long as it's easily accessible (kind of like the Softphone widget).
I need this for two reasons:
I need a quick way for users to change their "status" (a custom field on user).
I need to execute some custom javascript to hide certain elements from some page layouts.
Any idea if this can be done?
Note: when I say "Service Cloud Console" I mean this kind of console:
I think Custom Console Components may be what you are looking for? (Here is how to add them to the console once you made them. Note that after the 11 steps, it says 'Before you can access ...'.)
I have implemented similar thing using a custom console component , there you can add a visual-force page and add a button on it "Change Status". Once user clicks it get who is the logged in user .
String userid = UserInfo.getUserId()
rest is the simple logic to change the status on User record on the page controller.

Creating simple search for Google App Engine

Is there any simple way to create search for Google App Engine for specific datastore table.
Just want to create basic text search for this.
If you want full-text search over a Text field in a Model, try something like Bill Katz's SearchableModel.
You can only do a full-text search not partials.
What you could do if you really need to do a simple search and depending on how many records you are going to have, is create a cron job that creates a blobstore with the table key and the field you want to search. Then just use the blobstore for your searches. Remove the lines that dont have the search field and display the field as the result , with the key as your link to the relevant data.
Google App Engine - Full Text Search
Use Query Filter to search by specific column
See documentation here

Resources