Page 2 of 5

save to db

Posted: Tue Mar 26, 2013 4:54 pm
by Kateryna Grynko

Are you sure you send Header parameter X-Tiggzi-Session-Token? I cannot see it on screen shots. In mapping, add an array from localStorage variable token to Request parameter X-Tiggzi-Session-Token.


save to db

Posted: Tue Mar 26, 2013 6:08 pm
by Michael4771079

Hi Katya,
I tried the above, got a new error, here is the mapping and error

Image

Image


save to db

Posted: Tue Mar 26, 2013 6:34 pm
by Kateryna Grynko

In database, mobile column has type = number, but you try to save there a value = "07760 711409". This can't be converted to number and saved in mobile column.
You should delete mobile column in database and create a new one with type = String.


save to db

Posted: Tue Mar 26, 2013 7:28 pm
by Michael4771079

Great stuff Katya,
that now works for name,email,and mobile

I then went to addresses screen,
and onclick I ran the user_update,
on the mapping there is no localstorage variable for this array, here is a screen of mapping I mapped to component addressselectmenu, this does not work,
what am I missing here?

thanks for the assistance.

Image


save to db

Posted: Tue Mar 26, 2013 8:14 pm
by Kateryna Grynko

Options of a select menu component has label and value. Only value of a selected option is used in mapping.

If options list of addressselectmenu component is created dynamically, be sure that each option contains correct value of "value" property.


save to db

Posted: Tue Mar 26, 2013 8:43 pm
by Michael4771079

yes Katya,
the selectmenu is created by user, this menu has only label used, I do not know how to ensure the required address is saved in label and value


save to db

Posted: Tue Mar 26, 2013 9:54 pm
by Kateryna Grynko

If select menu options were created with JavaScript, be sure each option is created from HTML code that looks like:
code<option value="mail@tiggzi&#46;com">mail@tiggzi&#46;com<&#47;option>/code
Then value will be used in mapping.


save to db

Posted: Wed Mar 27, 2013 11:43 am
by Michael4771079

Hi Folks,
I'm lost here,

my addressesselectmenu is an array saved in local storage

to save an address this is the code used onclick

  1. save(Tiggzi('mobiletextinput12').val(), 'variable_name'

  2. setSelectMenuOptionsForAddresses(Tiggr('addressselectmenu'), myload('variable_name'));

    I have searched the forum for something regarding Katya's last post

    "a href="mailto:mail@tiggzi.com" rel="nofollow"mail@tiggzi.com/a"

    I understand that I am only using the label componentof the selectmenu,
    I need to be able to save the same address in both label and value, in order that I can map the value to the db

    where is the HTML Katya suggested to go?


save to db

Posted: Wed Mar 27, 2013 2:47 pm
by Maryna Brodina

That was just an example.

On Address page on Save button first event is updating of Select menu, but first event should be Invoke service. Just replace events on Save button


save to db

Posted: Wed Mar 27, 2013 3:01 pm
by Michael4771079

Hi Marina,
changed order of events as screenshot, it made no difference, address not saved in db

the problem is that the address is saved on the label of the selectmenu,
but the label cannot be mapped only value,

so what I am trying to solve is
how to save the entered address to both label and value
and then I should be able to map value to db

Thanks.

Image