Sapui5 autocomplete input - input

I'm developing an app with a login and I need use an autocomplete input. In HTML is easy to develop it, but I don't know how to implement.
I find a solution where set data to the input, but in my case, I can't do it.
Example:
First Time: Log with the name: "Name1"
Second Time: Log with the name: "Name2"
Third Time: When the user write "N", the input must show "Name1", "Name2"
Thanks!

Please use sap.m.Input and set it's property showSuggestion to true, also bind suggestionItems as in this example.

Related

store a field calculated with Javascript on a hidden field in the Auth0 Lock

I'm using Auth0 lock and would like to store a calculated field with JS during the signup. So far I've added a hidden field like:
additionalSignUpFields: [{
type: "hidden",
name: "myField",
value: "abc123"
}],
During the sign up I change the value of the field using JavaScript, and I can see the value has changed in the HTML. However, the value stored is always abc123. Is there a way to achieve what I want?

GA4 ecommerce items Array do not show up in debug mode

GA4 ecommerce items Array do not show up in debug mode
i am using the GTM, i am sure i passed the Array for items (using Datalayer or CJS), but GA4 does not recognized it , what i see is missing the items tab in debug mode, i don't know how that could be show up , am i doing something wrong? anyone has the same experience?
Looks like the event name is incorrect here -> View_Items.
Make sure that the event name exactly matches view_item
(stylized as snake_case).
As GA4 only allows ecommerce data collection with a set of pre-defined
event names.
Update :
I saw this checkbox is being checked
As you already set the value currency items in the event parameter. You can uncheck this setting.
I think you can follow Google's document about it
view_item_details
items: [
{
item_id: "SKU_12345",
item_name: "Stan and Friends Tee",
affiliation: "Google Merchandise Store",
coupon: "SUMMER_FUN",
currency: "USD",
discount: 2.22,
index: 0,
item_brand: "Google",
item_category: "Apparel",
item_category2: "Adult",
item_category3: "Shirts",
item_category4: "Crew",
item_category5: "Short sleeve",
item_list_id: "related_products",
item_list_name: "Related Products",
item_variant: "green",
location_id: "ChIJIQBpAG2ahYAR_6128GcTUEo",
price: 9.99,
quantity: 1
}
]
Make items array only contain 1 item
Google has a list of recommended events suggesting that the items are automatically collected. If your custom event name doesn't match the listed event, GA4 won't take the items data.
Note that even though you can use the GTM preview mode to check whether the data is correctly constructed, the shown data won't necessarily send to GA4.
The reason is that GTM only forwards the requested data instead of sending it to GA4 directly. To see this behavior, you may have a look at the dev tool such as Chrome dev tool. You can examine the forwarded request's payload in the network tab (search /collect.*/). If it's the recommended event, in payload, there's pr1, pr2, etc., representing your items' array data; otherwise, you'll see nothing, and thus the data won't show up in the GA4 debugging mode.
Do you use the same GTM data layer which initially track for GA Universal events ? If yes, then this may be the cause why the items array did not show on debug view since I found this issue also.
The solution is to create the new GTM Container, and name the data layer differently like 'datalayer2' to differentiate those data layers and set up your config again with 'datalayer2'
for instance, datalayer2.push(
{
event : view_promotion
....}

ImportXML google sheet for shipment package tracking

I want to track each FEDEX, DHL and UPS shipment status directly from google sheets. I am using importxml function:
=IMPORTXML("https://www.fedex.com/apps/fedextrack/?action=track&tracknumbers="&C2&"&locale=en_US&cntry_code=us","//h1/div[#class="redesignSnapshotTVC snapshotController_addr_label dest"]/title")
However it shows error.
Attaching my sheet link for this: https://docs.google.com/spreadsheets/d/1E1L0rn9-H4MCutI1On2uHDkkPo1pdjRpv014YREGIdU/edit?usp=sharing
Please tell what is best way to do it. I am from non tech background.
Thanks so much for help!
Common issue. You're trying to import html that is generated after loading. That means we have to look for how the data you want is generated.
Data source
Upon inspection of the site, I found that it was making an XHR to the URL https://www.fedex.com/trackingCal/track, and that it was doing so via POST with a long payload. The response was in JSON format. Of note, there is the scanEventList entry.
"scanEventList": [{
"date": "2020-07-15",
"time": "13:15:00",
"gmtOffset": "-07:00",
"status": "Delivery exception",
"statusCD": "DE",
"scanLocation": "SAN BERNARDINO, CA",
"scanDetails": "Future delivery requested",
"scanDetailsHtml": "",
"rtrnShprTrkNbr": "",
"statusExceptionCode": "17",
"isClearanceDelay": false,
"isDelivered": false,
"isDelException": true,
"isException": true
},
...
]
Solution
First, get the ImportJSON script from GitHub, and add it into your sheet's scripts (Tools > Script Editor). It's not the most amazing thing, but it will at least give us ImportJSONViaPost() to get the data we want:
=INDEX(ImportJSONViaPost("https://www.fedex.com/trackingCal/track","data=%7B%22TrackPackagesRequest%22%3A%7B%22appType%22%3A%22WTRK%22%2C%22appDeviceType%22%3A%22DESKTOP%22%2C%22supportHTML%22%3Atrue%2C%22supportCurrentLocation%22%3Atrue%2C%22uniqueKey%22%3A%22%22%2C%22processingParameters%22%3A%7B%7D%2C%22trackingInfoList%22%3A%5B%7B%22trackNumberInfo%22%3A%7B%22trackingNumber%22%3A%22"&A2&"%22%2C%22trackingQualifier%22%3A%22%22%2C%22trackingCarrier%22%3A%22%22%7D%7D%5D%7D%7D&action=trackpackages&locale=en_US&version=1&format=json",,"/TrackPackagesResponse/packageList/scanEventList,/TrackPackagesResponse/packageList/trackingCarrierDesc","noHeaders"),1)
Arguments:
URL for the tracker
The POST payload. Cell A2 Holds your tracking number.
Leave empty
Query - Lets us select the data that we want. In this example, I chose to select the carrier description and the entire scanEventList entry, but you can specify particular elements of that as well.
"noHeaders" means just the data.
Just using the JSON import gives us an entry for each element of scanEventList, but the first is the most recent, so, we use INDEX to retrieve the first entry, which should contain what you need.
For additional help on the ImportJSON package, see here.

Different JSON object value when logging the object and logging only specific field

I have a problem on accessing JSON Object on Javascript, especially React Native with Redux.
I want to access the value of some specific key within the object.
Here is the JSON object when I print it using console.log
{
"username": "user_name_of_user",
"name": "name_of_user",
"idVerified": false,
"emailVerified": true,
"phoneVerified": false,
"blocked": false,
"active": true
}
In particular, I want to access the emailVerified value.
I've been trying
user.emailVerified, user['emailVerified']
without luck,
I even try to do
console.log('user', user)
console.log('verification access using key', user['emailVerified'])
console.log('verification access using .', user.emailVerified)
strange enough, the first line, show the emailVerified, inside json content to be true but the others show as false
I have to try to search on Search Engine but didn't seem to find a similar problem, but maybe the keyword that I use is not correct too.
Have anyone find this strange behavior? Maybe some hint on how it was possible to happen and the solution?
By the way, this is react-native application, and the data is provided using redux.
EDIT 1:
a full response in a successive call as I write above
EDIT 2:
I call the data in successive as shown on the image
EDIT 3:
as per Pety Ialimijoro Rakotoniaina suggestion, I try to switch the console.log order, as shown on the Image, with no luck
EDIT 4:
OK, it seems something is wrong with the console.log itself, I try to show the content using the following code
and got these as the result
as you can see, the console.table(user), show different result as console.log('user', user), and console.table(user) is align with console.log('verification access using key', user['emailVerified']) and
console.log('verification access using .', user.emailVerified)
so I suspect that the result on console.log('user', user) might be the content from other item on the list,
OK, it seems something is wrong with the console.log itself, I try to show the content using the following code
and got these as the result
as you can see, the console.table(user), show different result than console.log('user', user), and console.table(user) is align with console.log('verification access using key', user['emailVerified']) and console.log('verification access using .', user.emailVerified)
so I suspect that the result on console.log('user', user) might be the content from other item on the list,
EDIT 1:
when I see the image result again, I see that the result to the right of user on third line, which is start with {name:"", is different than values below it, name, which is I censor, has a value, where the value above that on third line, show name: "". So maybe it was the Browser Cache that is to blame :p

Which fields are required to create an event through Social Tables API

I have the following questions that I was not clear on from the API documentation:
Which fields are required to create an event?
What does "Invalid field: 0" mean? (this was an error message received when trying to create an event)
The sample body includes "spaces" as string -- is this the space name or ID?
Is this required? If yes, to create a space I need an event ID but to create an event do I need a space?
Hey thanks for using our API. It looks like the developer docs on our portal got kind of mangled. We'll be working on fixing that soon.
In the meantime, let me try to help.
So, the actual required fields for that endpoint are very minimal, here is a small sample post I made for a room here at Social Tables:
{
"name": "Dan's Office Party",
"category": "Other",
"spaces": [
{
"name": "st test"
}
]
}
The key thing here is that spaces is an array, with at least a name property attached.
The error message you referred to is a failing validation check on the type of one of the fields you submitted.
You do need a space to create an event, but as you can see, only the name is absolutely required. However, if you want to do any diagramming with that event, you'll probably want to attach a venue_id with one of our floorplan IDs in addition to the name property.
I have created an issue to update the mangled doc located at https://developer.socialtables.com/api-console#!/Events/post_4_0_legacyvm3_teams_team_events and will comment here when it is updated.