Can you please help me with this question?
Thanks!
Can you please help me with this question?
Thanks!
In that case you can save responses of services to the storage variable, and use that variable in the final mapping. Before mapping you can change that variable as you want, but it is impossible to use two different mappings to the same component - it will be re-writed by the very last mapping, so, previous one won't be able
Sorry, I am not sure I was clear
I have
Collapsible block header which maps to database column TopMenu1_en or TopMenu1_gr
Inside the CollapsibleBlock I have checkboxes, which maps to database column SubMenu_en or SubMenu_gr
When I choose language "en", I want to dynamically change the mapping and have
Collapsible block header text from db columnTopMenu1_en and
Checkboxes text from db column SubMenu_en
This is not possible (change dynamically the mapping)?
I used the code in the Success event. Is this correct?
When I use the JS code, the result is the below
When I do the mapping without the JS code (not dynamic mapping) it is displayed properly
So I suspect that we are missing something in the JS code below:
================================
element.find('[name="InterestsColabsibleHeader"]').text(goalColumnValue);
=================================
Thanks!
No, it is impossible to use dynamic mapping
Can you explain why the JS code has the effect shown in the last two pictures uploaded please?
Thanks.
If you use JS on the mapping (https://devcenter.appery.io/documenta...) you are able to change the object "element" there. This is a currect element of the mapping (listitem, grid, label, etc.)
Appery.io generates new components automatically, so if you change a parent component it will change also all it's children.
Sorry is not very clear.
I am trying to dynamically change the text of the Collapsblock header, to show either Greek or English, depending on a local variable.
So I have the JS code in the top level as seen below, as you told me
The text of the header is changed properly, but I loose the "look" of the collapsible block, is displayed as just text. (see above 2 last images)
Should I put a code in somewhere else?
Should the below code be different?
================================
element.find('[name="InterestsColabsibleHeader"]').text(goalColumnValue);
=================================
so we do not loose the "look" of collapsible bock?
Thanks and sorry for the continuing questions
It looks fine. But as I said before - it is better to save the response with selected language to the storage variable (https://devcenter.appery.io/documenta...)
pre
var result = [];
$.each( data.results, function( key, value ) {
value.TopMenu = (language === "en") ? value.TopMenu_en : value.TopMenu_gr;
value.SubMenu = (language === "en") ? value.SubMenu_en : value.SubMenu_gr;
result.push(value);
});
Apperyio.storage.result.set(result);/pre
here language - selected language ("en" or "gr")
result - name of the Storage variable with the structure=service response + additional parameters TopMenu and SubMenu
And use that variable in the simple mapping (using columns TopMenu and SubMenu).
TopMenu and SubMenu - values of TopMenu and SubMenu, according to the selected language
I can't describe it more detailed - unfortunately this is something outside the scope of standard Appery.io platform support. You may consider purchasing Advisory Pack to get more in-depth help on this question. Here is more information about Advisory Pack (http://appery.io/services/#Advisory_Pack).