Hi,
For a JSON put request i need the yes/no column to be true/false. I know that the backend value in google sheets is true/false but appsheet uses Y/N. Is there a way to force this? Ofcourse i can fall back on a EnumType. But i like the switch buttons on the Quick edit columns option.
-Remco
Solved! Go to Solution.
THE SOLUTION: “true” and “false” in the IF statement with the " ". I think appsheets sends the true and false with Y /N. So we came back on the orignial problem
With big help from @LeventK!
{
"PtProject": {
"Element": {
"Fields": {
"PrId": "<<[Projectcode]>>",
"U47E045AF46C52C9490047C8376873EF6": "<<IF([Plattegrond__check_]='Y',"TRUE","FALSE")>>"
}
}
}
}
@Remco_Edelenbos
Y/N column values are also passes as true/false in a JSON body. Only in app’s UX views you see them as Y/N. But I believe you want to change the button appearance or button text as true/false, am I correct?
Sorry @Remco_Edelenbos it’s my bad…The toggle button (Y/N type column in Detail View appears as a toggle button) records it as TRUE/FALSE
Yes, in my google sheet is records as a true/false but. As you can see in my screenshot above, Appsheet record it as Y/N. you can also see it in the table behind the message.
@Remco_Edelenbos
In a JSON body;
{
"SomeKey": "<<[Your_YN_Column_Name]>>"
}
when evaluated, SomeKey parameter shall take a Boolean value of TRUE/FALSE no matter what display value you are seeing inside the AppSheet app. Can you please post or take a screenshot of your JSON body?
This is my body:
{
"PtProject": {
"Element": {
"Fields": {
"U47E045AF46C52C9490047C8376873EF6": <<[Plattegrond__check_]>>,
"UF85A116A4D0561FF34F7D91081CC0C00": <<[Accreditatie__check_]>>,
"UC98BD5A847712AC3AEE03A8D3176AADF": <<[All_check]>>
}
}
}
}
@Remco_Edelenbos
Your JSON is unfortunatey malformed. Check this out and notice that your AppSheet placeholders are wrapped with double quotes:
{
"PtProject": {
"Element": {
"Fields": {
"U47E045AF46C52C9490047C8376873EF6": "<<[Plattegrond__check_]>>",
"UF85A116A4D0561FF34F7D91081CC0C00": "<<[Accreditatie__check_]>>",
"UC98BD5A847712AC3AEE03A8D3176AADF": "<<[All_check]>>"
}
}
}
}
Provided it still produces the same result, try with this one intead:
{
"PtProject": {
"Element": {
"Fields": {
"U47E045AF46C52C9490047C8376873EF6": "<<IF([Plattegrond__check_]='Y',TRUE,FALSE)>>",
"UF85A116A4D0561FF34F7D91081CC0C00": "<<IF([Accreditatie__check_]='Y',TRUE,FALSE)>>",
"UC98BD5A847712AC3AEE03A8D3176AADF": "<<IF([All_check]='Y',TRUE,FALSE)>>"
}
}
}
}
Hi @LeventK,
I’m trying, but i don’t get it to work… with this JSON:
{
"PtProject": {
"Element": {
"Fields": {
"PrId": "<<Projectcode>>",
"U47E045AF46C52C9490047C8376873EF6": "<<IF([Plattegrond__check_]="Y",true,false)>>"
}
}
}
}
But when i put my JSON like this it works:
{
"PtProject": {
"Element": {
"Fields": {
"PrId": "<<Projectcode>>",
"U47E045AF46C52C9490047C8376873EF6": "true" //with and without the ""
}
}
}
}
ARGGG
@Remco_Edelenbos
May I encourage you to try with this one?
{
"PtProject": {
"Element": {
"Fields": {
"U47E045AF46C52C9490047C8376873EF6": "<<IF([Plattegrond__check_]='Y',TRUE,FALSE)>>",
"UF85A116A4D0561FF34F7D91081CC0C00": "<<IF([Accreditatie__check_]='Y',TRUE,FALSE)>>",
"UC98BD5A847712AC3AEE03A8D3176AADF": "<<IF([All_check]='Y',TRUE,FALSE)>>"
}
}
}
}
THE SOLUTION: “true” and “false” in the IF statement with the " ". I think appsheets sends the true and false with Y /N. So we came back on the orignial problem
With big help from @LeventK!
{
"PtProject": {
"Element": {
"Fields": {
"PrId": "<<[Projectcode]>>",
"U47E045AF46C52C9490047C8376873EF6": "<<IF([Plattegrond__check_]='Y',"TRUE","FALSE")>>"
}
}
}
}
User | Count |
---|---|
16 | |
10 | |
9 | |
8 | |
3 |