`campaign` and `customer` can be segmented by `convertion_action` but not natively get fields of `convertion_action`? - google-ads-api

How can it be that convertion_action G-Ads report table can natively get fields of customer but not the other way around.
Also: campaign and customer can be segmented by convertion_action but not natively get fields of convertion_action?

Related

Retrieving history of tracked fields odoo 11

I want to know how to retrieve the history of tracked fields in odoo 11, so I can use them later for statistics and maybe use graphs to display some of its significant changes and such.
I know they get displayed in the chatter below the record and its related to mail.thread, but I don't know if there's a way to get those information for other manipulations, or where they're located in the database
Changes to tracked fields are stored in the mail.tracking.value model. You can review the table structure and methods in core/addons/mail/models/mail_tracking_value.py (in Odoo 11.0).
You can view the Messages directly to review some of the data by going to Settings > Technical > Email > Messages and filtering on Tracking values "is set".
The model is very basic, but you should be able to work with the message values to get your report/history data by sorting on the mail_message_id's date and time.

SurveyMonkey: How do you determine a survey's ID?

For a given survey, how do you determine its survey_id for use with the SurveyMonkey API?
A list of all IDs is returned by the API method get_survey_list, and you could subsequently call get_survey_details on each survey to determine which one is the intended one, but that seems needlessly complicated. There has to be a way to get a survey's ID from the My Surveys page, right?
Edit:
Whoops, get_survey_details isn't actually necessary, since get_survey_list can take a fields parameter that includes the survey's title.
If you want to get the survey ID via the web page you can:
Right click on the survey in the "ALL SURVEYS" surveys view, and press "Inspect Element" or "Inspect" depending on your browser.
In the bottom of the browser, you will see a highlighted block that starts with:
<a href="/summary/...
Scroll up a few lines until you see a line that starts with:
<tr class="survey-row" id=`
The number that follows id= is the survey id, which you can then use in the API.
Nothing much to add to what Tony & Miles said, just that my UI form contains these fields:
1) An Age limit - eg the past 365 days
2) A keyword in the title - typically all the surveys for one client have that client's name in the title. Hint: if you can be organised enough to enforce a convention, and put keywords in the nickname, the nickname is what the API looks in for Title, although what the user sees is the other title.
3) A start date to get responses only after a start date - the first day may have been only a test.
4) A combobox with all the matching surveys is presented showing the title, number of respondents, date created and date recently modified, pretty much the same as what appears in the SurveyMonkey web UI. That's where they pick the one they want.
HTH
Patrick

Multiple select field in LocomotiveCMS?

I need to set up a field in LocomotiveCMS that is similar to Select but allows multiple selections. Something like in HTML... does LocomotiveCMS allow for that, or will I have to do some ruby coding to get that to work?
Any help would be appreciated, thanks!
Old question but still a thing.
I'm unsure whether your question relates to fields within the Locomotive CMS Back Office or on the front end so I've addressed both below.
Front End
Irrespective of whether or not you're dealing with Locomotive CMS content types, either of the following will allow selection of multiple values on the front end:
Listbox (select element with the multiple attribute)
A series of checkbox inputs with the same value in the name property
Back Office
If you need to allow selection of multiple values within the Back Office, you can do this for content types using the has_many or many_to_many content type relationships.
If you need multiple value selection outside of content types (e.g. in metafields schema) you're unfortunately out of luck.

Cascading dropdown using MySQL database, Formtastic and Active Admin

I have managed to create a drop-down that is filled from the service model. The service model is managed from a MySQL table. I used this code:
f.input :service, :as => :select #<-- :as not really needed, I know...
I would like to have another select box below the service select that is filled with teams from the team model (teams table in MySQL database) based on what the user selected from the service select.
For example if Service 1 was selected from the service select then the team select would be filled with the teams (Team 1, Team 2) that have the foreign key of service_id = 1 in the teams table in the database. If anyone could help with how to insert the correct associations and Formtastic code to achieve this I would greatly appreciate it.
If you want the contents of one select to change (reduce the number of options) based on the selection made in another select box, this is mostly a client-side programming issue — Formtastic can't modify the DOM once sent to the browser.
You need one piece of JS to watch for changes in the Service select, and another to modify the Team select in some way based on that selection. For this, you have a heap of options here, but it's really not a Formtastic issue, other than perhaps how to render the correct markup for your JS to work.
In the past, I've done all of these at different times:
rendering a separate Team select box for each possible Service selection, then showing/hiding the correct one in the DOM as needed with JS
rendering a data attribute on each option in the Team select noting which Service it support so that the JS can remove or disable options based on the Service selected
I prefer #2, but #1 is probably easier within Formtastic.

Delphi: Multiple tokens edit component

I'm looking for an enchanced edit component that allow users to input multiple tokens (items) manually separated by some symbol, or to select them from another source.
It's something like "TO" field in outlook or facebook that allow you to input multiple recipients.
Can anyone suggest any solution?
The way we sort of do it is to use an normal button edit box and when the user clicks the button we present a separate form (which can be made to look like a drop down box if you like) with a checklist or listview with checkboxes enabled or similar. The user selects any number of the items then when the form closes we take the list of selected items and present them in the edit as a comma or semi-colon separated list. The edit itself is read-only so all interaction goes through the separate form.
But - I really don't like the whole approach (for our app) as it doesn't look good when you have many selected items and I'm looking to find a better way of showing the selection! I suppose one option is to use a read-only memo with scrollbars to show the items.
TMS has some nice components, one of which is the TCheckListEdit which might be of use.

Resources